From 1fba81a1b7ee84ed7dfccbe37e3369d31edfce49 Mon Sep 17 00:00:00 2001 From: Andrei Ivushkin Date: Mon, 15 May 2023 20:56:37 +0300 Subject: [PATCH] Fixes #12: sbasm exit code = 0 when error is not fatal? --- sbapack/assem.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sbapack/assem.py b/sbapack/assem.py index ecb253c..50c4097 100644 --- a/sbapack/assem.py +++ b/sbapack/assem.py @@ -81,6 +81,12 @@ def RunSbassembler(): # A run command is given, let's run it os.system(dec.Asm.Run_Command) + elif dec.Asm.Errors > 0: + if dec.Asm.Pass == 1: + sys.exit(dec.ERRLVL_PASS1) + else: + sys.exit(dec.ERRLVL_PASS2) + # ------------------------------------------------------------------------------