fix(scripts): use requested platform for shim checks · openclaw/openclaw@d48dcc6
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -118,7 +118,7 @@ function isExecutableFile(path, platform) {
|
118 | 118 | function spawnInvocation(command, commandArgs, env, platform) { |
119 | 119 | const extension = extname(command).toLowerCase(); |
120 | 120 | if (platform === "win32" && (extension === ".cmd" || extension === ".bat")) { |
121 | | -const nodeShim = resolveNodeCmdShim(command); |
| 121 | +const nodeShim = resolveNodeCmdShim(command, platform); |
122 | 122 | if (nodeShim) { |
123 | 123 | return { |
124 | 124 | command: nodeShim.node, |
@@ -134,7 +134,7 @@ function spawnInvocation(command, commandArgs, env, platform) {
|
134 | 134 | return { command, args: commandArgs }; |
135 | 135 | } |
136 | 136 | |
137 | | -function resolveNodeCmdShim(command) { |
| 137 | +function resolveNodeCmdShim(command, platform) { |
138 | 138 | let content; |
139 | 139 | try { |
140 | 140 | content = readFileSync(command, "utf8"); |
@@ -148,7 +148,7 @@ function resolveNodeCmdShim(command) {
|
148 | 148 | continue; |
149 | 149 | } |
150 | 150 | const script = resolve(dirname(command), match[2]); |
151 | | -if (!isExecutableFile(script, process.platform)) { |
| 151 | +if (!isExecutableFile(script, platform)) { |
152 | 152 | continue; |
153 | 153 | } |
154 | 154 | return { node: match[1], script }; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。