From f0e66ef465586c1dcc9f6abe18a4a690d4e13b55 Mon Sep 17 00:00:00 2001 From: Alexander Graf <17130992+aandergr@users.noreply.github.com> Date: Fri, 24 Jul 2020 17:19:48 +0200 Subject: [PATCH] Windows EXE: Fix CommandNotFoundException Fixes CommandNotFoundException that occured when started from within a directory whose name contains a space. --- deploy/windows/create_exe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/windows/create_exe.py b/deploy/windows/create_exe.py index 33d5928..292c9b8 100644 --- a/deploy/windows/create_exe.py +++ b/deploy/windows/create_exe.py @@ -17,7 +17,7 @@ import subprocess def __main(): with contextlib.suppress(AttributeError, psutil.Error): if psutil.Process().parent().parent().name() == "explorer.exe": - subprocess.Popen("powershell -NoExit -Command \\\"& {0}\\\"".format(sys.argv[0])) + subprocess.Popen("powershell -NoExit -Command \\\"& '{0}'\\\"".format(sys.argv[0])) return main()