make silent_system
show error by default
This commit is contained in:
parent
cb1ade47c4
commit
8c5423e257
3 changed files with 3 additions and 3 deletions
2
setup.py
2
setup.py
|
@ -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:
|
||||
system(f"{command} &> /dev/null")
|
||||
else:
|
||||
|
|
|
@ -4,7 +4,7 @@ from src.util import silent_system
|
|||
|
||||
|
||||
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")
|
||||
exit(1)
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ def zsh_system(command: str) -> None:
|
|||
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.
|
||||
A copy of this function also exists in `setup.py`."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue