From c5323934df286aaa2e3d400dba417b838bfa9d19 Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Wed, 30 Jan 2019 09:19:58 +0100 Subject: [PATCH] selfupdate: Fix for west selfupdate mechanism Fixes: #173 This commit adds sys.argv[0] when restarting west after an update. Signed-off-by: Torsten Rasmussen --- src/west/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/west/main.py b/src/west/main.py index c12d871..a3d78b7 100755 --- a/src/west/main.py +++ b/src/west/main.py @@ -503,7 +503,7 @@ def main(argv=None): except WestUpdated: # West has been automatically updated. Restart ourselves to run the # latest version, with the same arguments that we were given. - os.execv(sys.executable, [sys.executable] + argv) + os.execv(sys.executable, [sys.executable] + [sys.argv[0]] + argv) except KeyboardInterrupt: sys.exit(0) except CalledProcessError as cpe: