Skip to content

Commit af944f8

Browse files
authored
fix: escape exeName in batch script for Windows restart (#44)
1 parent 7005fb6 commit af944f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/restart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async function restartWindows() {
8787
' Start-Sleep -Milliseconds 100',
8888
'}',
8989
].join('')
90-
const batchScript = `taskkill /F /IM ${exeName}.exe >nul && powershell -Command "${checkScript}" && "${binary}"`
90+
const batchScript = `taskkill /F /IM "${exeName}.exe" >nul && powershell -Command "${checkScript}" && "${binary}"`
9191

9292
return spawn(
9393
process.env.comspec ?? 'cmd',

0 commit comments

Comments
 (0)