diff --git a/fre/make/gfdlfremake/buildBaremetal.py b/fre/make/gfdlfremake/buildBaremetal.py index a6a9c208..71c81bab 100644 --- a/fre/make/gfdlfremake/buildBaremetal.py +++ b/fre/make/gfdlfremake/buildBaremetal.py @@ -140,10 +140,14 @@ def run(self): # Direct output to log file as well p2 = subprocess.Popen(["tee",self.bld+"/log.compile"], stdin=p1.stdout) - # Allow p1 to receive SIGPIPE is p2 exits + # Allow process1 to receive SIGPIPE is process2 exits p1.stdout.close() p2.communicate() + # wait for process1 to finish before checking return code + p1.wait() if p1.returncode != 0: print(f"\nThere was an error running {self.bld}/compile.sh") print(f"Check the log file: {self.bld}/log.compile") + else: + print(f"\nSuccessful run of {self.bld}/compile.sh")