Skip to content

Commit f825944

Browse files
feat(cli): allow electron to start tauri (#13253)
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
1 parent 853ed46 commit f825944

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changes/change-pr-13253.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@tauri-apps/cli": patch:enhance
3+
"tauri-cli": patch:enhance
4+
---
5+
6+
Allow electron to run the CLI directly

packages/cli/tauri.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (globalThis.navigator?.userAgent?.includes('Deno')) {
2020
}
2121
// Even if started by a package manager, the binary will be NodeJS.
2222
// Some distribution still use "nodejs" as the binary name.
23-
else if (binStem.match(/(nodejs|node|bun)\-?([0-9]*)*$/g)) {
23+
else if (binStem.match(/(nodejs|node|bun|electron)\-?([0-9]*)*$/g)) {
2424
const managerStem = process.env.npm_execpath
2525
? path.parse(process.env.npm_execpath).name.toLowerCase()
2626
: null

0 commit comments

Comments
 (0)