1
0
Fork 0

Add a FIXME that executing commands is not black-and-white

master v0.2
LEdoian 5 years ago
parent b430290d21
commit 83c81f8783

@ -188,6 +188,7 @@ def run_command(cmd: Command):
process = subprocess.run(local_command) process = subprocess.run(local_command)
if process.returncode != 0: if process.returncode != 0:
# TODO: Print in color (red?) # TODO: Print in color (red?)
# FIXME: This kind-of implements 'set -e', but doesn't allow to skip commands in the same hunk
answer = input(f"Command {process.args} failed with return code {process.returncode}. Continue? ") answer = input(f"Command {process.args} failed with return code {process.returncode}. Continue? ")
if not answer.startswith(('Y', 'y', 'a', 'A')): # We are Czech, so "ano" is a valid answer :-) if not answer.startswith(('Y', 'y', 'a', 'A')): # We are Czech, so "ano" is a valid answer :-)
print("Bailing out") print("Bailing out")

Loading…
Cancel
Save