feat(cli): allow electron to start tauri (#13253)

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
This commit is contained in:
Quentin Goinaud
2026-01-20 22:19:05 +01:00
committed by GitHub
parent 853ed4642f
commit f82594410c
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@tauri-apps/cli": patch:enhance
"tauri-cli": patch:enhance
---
Allow electron to run the CLI directly

View File

@@ -20,7 +20,7 @@ if (globalThis.navigator?.userAgent?.includes('Deno')) {
}
// 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|bun)\-?([0-9]*)*$/g)) {
else if (binStem.match(/(nodejs|node|bun|electron)\-?([0-9]*)*$/g)) {
const managerStem = process.env.npm_execpath
? path.parse(process.env.npm_execpath).name.toLowerCase()
: null