diff --git a/.changes/clijs-node-version-20.md b/.changes/clijs-node-version-20.md new file mode 100644 index 000000000..4653a985c --- /dev/null +++ b/.changes/clijs-node-version-20.md @@ -0,0 +1,5 @@ +--- +'@tauri-apps/cli': patch +--- + +Fix nodejs binary regex when `0` is in the version name, for example `node-20` diff --git a/tooling/cli/node/tauri.js b/tooling/cli/node/tauri.js index 3bd320171..1516306df 100755 --- a/tooling/cli/node/tauri.js +++ b/tooling/cli/node/tauri.js @@ -20,7 +20,7 @@ if (bin === '@tauri-apps/cli') { } // Even if started by a package manager, the binary will be NodeJS. // Some distribution still use "nodejs" as the binary name. -else if (binStem.match(/(nodejs|node)\-?([1-9]*)*$/g)) { +else if (binStem.match(/(nodejs|node)\-?([0-9]*)*$/g)) { const managerStem = process.env.npm_execpath ? path.parse(process.env.npm_execpath).name.toLowerCase() : null