Skip to content

Commit aef087d

Browse files
author
Matthias Putz
committed
Fix: returning exit code from subprocess call
1 parent 13508fd commit aef087d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def _Main(argv):
525525
argv.extend(rce.extra_args)
526526
try:
527527
# os.execv(__file__, argv)
528-
subprocess.call([sys.executable] + argv)
528+
result = subprocess.call([sys.executable] + argv)
529529
except OSError as e:
530530
print('fatal: cannot restart repo after upgrade', file=sys.stderr)
531531
print('fatal: %s' % e, file=sys.stderr)

repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ def main(orig_args):
805805
me.extend(extra_args)
806806
try:
807807
# os.execv(sys.executable, me)
808-
subprocess.call(me)
808+
sys.exit(subprocess.call(me))
809809
except OSError as e:
810810
_print("fatal: unable to start %s" % repo_main, file=sys.stderr)
811811
_print("fatal: %s" % e, file=sys.stderr)

0 commit comments

Comments
 (0)