1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-08-17 12:19:38 +02:00

Windows EXE: Fix CommandNotFoundException

Fixes CommandNotFoundException that occured when started from within a
directory whose name contains a space.
This commit is contained in:
Alexander Graf 2020-07-24 17:19:48 +02:00
parent e232c82d5e
commit f0e66ef465

View File

@ -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()