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 <torsten.rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2019-01-30 09:19:58 +01:00 committed by Marti Bolivar
parent 74ec604954
commit c5323934df
1 changed files with 1 additions and 1 deletions

View File

@ -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: