mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(cli): accept node24 executable names in argv reparse
This commit is contained in:
@@ -204,6 +204,18 @@ describe("argv helpers", () => {
|
||||
rawArgs: ["/usr/bin/node-22.2.0", "openclaw", "status"],
|
||||
expected: ["/usr/bin/node-22.2.0", "openclaw", "status"],
|
||||
},
|
||||
{
|
||||
rawArgs: ["node24", "openclaw", "status"],
|
||||
expected: ["node24", "openclaw", "status"],
|
||||
},
|
||||
{
|
||||
rawArgs: ["/usr/bin/node24", "openclaw", "status"],
|
||||
expected: ["/usr/bin/node24", "openclaw", "status"],
|
||||
},
|
||||
{
|
||||
rawArgs: ["node24.exe", "openclaw", "status"],
|
||||
expected: ["node24.exe", "openclaw", "status"],
|
||||
},
|
||||
{
|
||||
rawArgs: ["nodejs", "openclaw", "status"],
|
||||
expected: ["nodejs", "openclaw", "status"],
|
||||
|
||||
@@ -172,7 +172,7 @@ export function buildParseArgv(params: {
|
||||
return ["node", programName || "openclaw", ...normalizedArgv];
|
||||
}
|
||||
|
||||
const nodeExecutablePattern = /^node-\d+(?:\.\d+)*(?:\.exe)?$/;
|
||||
const nodeExecutablePattern = /^node(?:-\d+|\d+)(?:\.\d+)*(?:\.exe)?$/;
|
||||
|
||||
function isNodeExecutable(executable: string): boolean {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user