Skip to content

Commit

Permalink
feat: add automatic shell restart
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen-RA-King committed Mar 13, 2023
1 parent 13d5469 commit b02d031
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pynball/pynball.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,13 @@ def system(ctx: Any, name: str) -> None:
_setenv("system", "PATH", all_paths)
message = "New version set"
_feedback(message, "nominal")
message = "Remember to restart the shell to use the new version"
message = "restarting the shell to use the new version"
_feedback(message, "warning")
if os.name == "nt":
os.system("taskkill /f /im explorer.exe > nul 2>&1")
else:
os.system("taskkill /f /im explorer.exe > /dev/null 2>&1")
os.system("start explorer.exe")


@cli.command()
Expand Down

0 comments on commit b02d031

Please sign in to comment.