1
0
Fork 0

make silent_system show error by default

This commit is contained in:
Kim, Jimin 2022-07-01 14:25:15 +09:00
parent cb1ade47c4
commit 8c5423e257
3 changed files with 3 additions and 3 deletions

View file

@ -22,7 +22,7 @@ tmp_dir = "/tmp/com.developomp.setup"
# #
def silent_system(command: str, suppress_error: bool = True) -> None: def silent_system(command: str, suppress_error: bool = False) -> None:
if suppress_error: if suppress_error:
system(f"{command} &> /dev/null") system(f"{command} &> /dev/null")
else: else:

View file

@ -4,7 +4,7 @@ from src.util import silent_system
def install_via_pacman(package: str): def install_via_pacman(package: str):
if silent_system(f"paru -S --noconfirm {package}"): if silent_system(f"paru -S --noconfirm {package}", True):
log.error(f"Failed to install {package} via pacman") log.error(f"Failed to install {package} via pacman")
exit(1) exit(1)

View file

@ -131,7 +131,7 @@ def zsh_system(command: str) -> None:
system(f"/usr/bin/zsh -c '{command}'") system(f"/usr/bin/zsh -c '{command}'")
def silent_system(command: str, suppress_error: bool = True) -> None: def silent_system(command: str, suppress_error: bool = False) -> None:
"""os.system but does not show its log and error to the terminal. """os.system but does not show its log and error to the terminal.
A copy of this function also exists in `setup.py`.""" A copy of this function also exists in `setup.py`."""