Skip to content

Commit

Permalink
feat: speed up restart app on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
subframe7536 committed Dec 18, 2024
1 parent cc070e6 commit 8cbcb50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/restart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ async function restartMacOS() {
'-e',
`quit app "${nameLong}"`,
'-e',
'delay 1',
'repeat with i from 1 to 100',
'-e',
`if not (application "${nameLong}" is running) then exit repeat`,
'-e',
'delay 0.1',
'-e',
'end repeat',
'-e',
`do shell script quoted form of "${binary}"`,
],
Expand Down

0 comments on commit 8cbcb50

Please sign in to comment.