forward the exit code
This commit is contained in:
@ -361,7 +361,7 @@ def abra(*args: str, machine_output: bool = False, ignore_error: bool = False) -
|
||||
logging.debug(f"run command: {' '.join(command)}")
|
||||
process = subprocess.run(command, capture_output=True)
|
||||
if process.stderr and ignore_error:
|
||||
logging.debug(process.stderr.decode())
|
||||
logging.warning(process.stderr.decode())
|
||||
if process.stdout:
|
||||
logging.debug(process.stdout.decode())
|
||||
if process.returncode and not ignore_error:
|
||||
@ -1093,7 +1093,8 @@ def purge(recipes: Tuple[str], noninteractive: bool) -> None:
|
||||
if noninteractive or input(f"Do you really want to purge these apps? Type YES: ") == "YES":
|
||||
for domain in domains:
|
||||
logging.info(f'purge {domain}')
|
||||
abra("app", "rm", "-n", domain)
|
||||
output = abra("app", "rm", "-n", domain, ignore_error=True)
|
||||
print(output)
|
||||
print(f"{domain} purged")
|
||||
|
||||
|
||||
|
||||
@ -21,4 +21,6 @@ fi
|
||||
# Activate the virtual environment
|
||||
source $VENV_PATH/bin/activate
|
||||
python3 $SCRIPT_DIR/alakazam.py "$@"
|
||||
py_exit=$?
|
||||
deactivate
|
||||
exit "$py_exit"
|
||||
|
||||
Reference in New Issue
Block a user