west: main: fix incorrect use of sys.argv
The argument array to main is in the argv argument, *not* sys.argv. Fix this. (Using sys.argv directly prevents the main function from getting its arguments from an arbitrary value specified by the caller.) Signed-off-by: Marti Bolivar <marti@foundries.io>
This commit is contained in:
parent
b1959be7d3
commit
2cff25e88c
|
@ -219,7 +219,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] + sys.argv)
|
||||
os.execv(sys.executable, [sys.executable] + argv)
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(0)
|
||||
except CalledProcessError as cpe:
|
||||
|
|
Loading…
Reference in New Issue