Skip to content

Commit

Permalink
improve error reporting if exe in deploy script does not exist
Browse files Browse the repository at this point in the history
Adds a check and outputs the printed message in red. I failed to interpret the actual python error messages reported...

Diffs=
14dcaa0cde improve error reporting if exe in deploy script does not exist (#8618)

Co-authored-by: klingerj <16977116+klingerj@users.noreply.github.com>
  • Loading branch information
klingerj and klingerj committed Dec 18, 2024
1 parent 2d754a6 commit c2b6548
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2a6cf9d0a60f53d8d8f0c6e2d2d837f441780902
14dcaa0cdedd07c92b77bc013567251ffc29b2c6
8 changes: 7 additions & 1 deletion tests/deploy_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ def cancel_input():
input_cancelled = True
input_received_cond.notify_all()

class text_colors:
ERROR = '\033[91m'
ENDCOL = '\033[0m'

# Launch a process in a separate thread and crash if it fails.
class CheckProcess(threading.Thread):
Expand All @@ -142,7 +145,10 @@ def __init__(self, cmd):
self.cmd = ["echo", "\n <command> "] + ['"%s"' % arg for arg in self.cmd]
if args.verbose:
print(' '.join(self.cmd), flush=True)
self.proc = subprocess.Popen(self.cmd)
if shutil.which(self.cmd[0]) is None:
print(f'{text_colors.ERROR}' + self.cmd[0] + ' does not exist!' + f'{text_colors.ENDCOL}')
else:
self.proc = subprocess.Popen(self.cmd)

def run(self):
self.proc.wait()
Expand Down

0 comments on commit c2b6548

Please sign in to comment.