Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Commit afc7ef6

Browse files
authored
Merge pull request #115 from firede/master
stop fuse task when electron process exited.
2 parents ce398ea + 074f6d7 commit afc7ef6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fuse.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ Sparky.task("default", ["copy-html"], () => {
5656
return fuse.run().then(() => {
5757
if (!isProduction) {
5858
// startup electron
59-
spawn("node", [`${__dirname}/node_modules/electron/cli.js`, __dirname], { stdio: "inherit" })
59+
spawn("node", [`${__dirname}/node_modules/electron/cli.js`, __dirname], {
60+
stdio: "inherit",
61+
}).on("exit", code => {
62+
console.log(`electron process exited with code ${code}`)
63+
process.exit(code)
64+
})
6065
}
6166
})
6267
})

0 commit comments

Comments
 (0)