Skip to content

Commit ee16c63

Browse files
committed
fix: respawn uses incorrect (Renderer) executable when called from UI mode
1 parent c39d6a5 commit ee16c63

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: plugins/plugin-codeflare/src/controller/respawn.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ async function guidebookStore() {
8080
export default async function respawnCommand(cmdline: string | string[]) {
8181
return {
8282
argv: [
83-
encodeComponent(process.argv[0]),
83+
// re: replace, in UI mode on macOS, the argv[0] points to the renderer executable
84+
encodeComponent(
85+
process.argv[0].replace(
86+
/\/Frameworks\/(\w+) Helper \(Renderer\)\.app\/Contents\/MacOS\/\w+ Helper \(Renderer\)$/,
87+
"/MacOS/$1"
88+
)
89+
),
8490
encodeComponent((await headlessRoot()) + "/codeflare.min.js"),
8591
"--",
8692
...(typeof cmdline === "string" ? [cmdline] : cmdline),

0 commit comments

Comments
 (0)