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:
parent
74ec604954
commit
c5323934df
|
@ -503,7 +503,7 @@ def main(argv=None):
|
||||||
except WestUpdated:
|
except WestUpdated:
|
||||||
# West has been automatically updated. Restart ourselves to run the
|
# West has been automatically updated. Restart ourselves to run the
|
||||||
# latest version, with the same arguments that we were given.
|
# 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:
|
except KeyboardInterrupt:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
except CalledProcessError as cpe:
|
except CalledProcessError as cpe:
|
||||||
|
|
Loading…
Reference in New Issue