Return nonzero status on MPW error

This commit is contained in:
Elliot Nunn 2019-12-21 06:00:11 +08:00
parent 7627be1e6d
commit 4b5bd86876
1 changed files with 4 additions and 0 deletions

View File

@ -208,3 +208,7 @@ os.remove(config.hfsimg)
if config.passthru is not None:
wsheet = vol['MPW']['Worksheet'].data.decode('mac_roman').replace('\r', '\n')
print(wsheet, end='')
# Slightly hacky way to extract an exit status
if re.search(r'^### MPW Shell - Execution of .* terminated', wsheet, re.MULTILINE):
sys.exit(1)