Skip to content

Commit

Permalink
draft hack to exit Chrome cleanly on Windows (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
kensoh authored and siowyisheng committed Mar 10, 2020
1 parent 3706200 commit 627d4dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tagui.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,11 @@ if not exist "tagui_logging" (
if exist "%flow_file%.js" del "%flow_file%.js"
)

rem hack chrome to prevent ended unexpectedly message
set "chrome_pref=%LOCALAPPDATA%\Google\Chrome\User Data\Default"
gawk "sub(\"\\\"exited_cleanly\\\":false\", \"\\\"exited_cleanly\\\":true\")" "%chrome_pref%" > "%chrome_pref%"
gawk "sub(\"\\\"exit_type\\\":\\\"Crashed\\\"\", \"\\\"exit_type\\\":\\\"Normal\\\"\")" "%chrome_pref%" > "%chrome_pref%"

rem change back to initial directory where tagui is called
cd /d "%initial_dir%"

Expand Down

0 comments on commit 627d4dd

Please sign in to comment.