mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-28 03:47:37 +03:00
fix(cli.js): detect node-20 binary (#6667)
* fix nodejs binary regex * Update clijs-node-version-20.md
This commit is contained in:
parent
1161b6788e
commit
fb7ef8dacd
5
.changes/clijs-node-version-20.md
Normal file
5
.changes/clijs-node-version-20.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'@tauri-apps/cli': patch
|
||||
---
|
||||
|
||||
Fix nodejs binary regex when `0` is in the version name, for example `node-20`
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user