@@ -8,6 +8,7 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
88import { runPluginCommandWithTimeout } from "openclaw/plugin-sdk/run-command" ;
99import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env" ;
1010import { CONFIG_DIR , extractArchive , resolveBrewExecutable } from "openclaw/plugin-sdk/setup-tools" ;
11+ import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime" ;
1112
1213export type ReleaseAsset = {
1314 name ?: string ;
@@ -64,10 +65,12 @@ export function pickAsset(
6465 ) ;
6566
6667 // Archives only, excluding signature files (.asc)
67- const archives = withName . filter ( ( a ) => looksLikeArchive ( a . name . toLowerCase ( ) ) ) ;
68+ const archives = withName . filter ( ( a ) =>
69+ looksLikeArchive ( normalizeLowercaseStringOrEmpty ( a . name ) ) ,
70+ ) ;
6871
6972 const byName = ( pattern : RegExp ) =>
70- archives . find ( ( asset ) => pattern . test ( asset . name . toLowerCase ( ) ) ) ;
73+ archives . find ( ( asset ) => pattern . test ( normalizeLowercaseStringOrEmpty ( asset . name ) ) ) ;
7174
7275 if ( platform === "linux" ) {
7376 // The official "Linux-native" asset is an x86-64 GraalVM binary.
@@ -253,7 +256,7 @@ async function installSignalCliFromRelease(runtime: RuntimeEnv): Promise<SignalI
253256 const installRoot = path . join ( CONFIG_DIR , "tools" , "signal-cli" , version ) ;
254257 await fs . mkdir ( installRoot , { recursive : true } ) ;
255258
256- if ( ! looksLikeArchive ( asset . name . toLowerCase ( ) ) ) {
259+ if ( ! looksLikeArchive ( normalizeLowercaseStringOrEmpty ( asset . name ) ) ) {
257260 return { ok : false , error : `Unsupported archive type: ${ asset . name } ` } ;
258261 }
259262 try {
0 commit comments