diff --git a/rwx/ps/__init__.py b/rwx/ps/__init__.py index 5b50456..6471fff 100644 --- a/rwx/ps/__init__.py +++ b/rwx/ps/__init__.py @@ -14,7 +14,7 @@ def get_tuples_args(tuples) -> list[str]: def run(*tuples) -> subprocess.CompletedProcess: - return subprocess.run(get_tuples_args(tuples), capture_output=False) + return subprocess.run(get_tuples_args(tuples), capture_output=False, check=True) def run_line(*tuples, charset: str = txt.CHARSET) -> str: @@ -23,6 +23,6 @@ def run_line(*tuples, charset: str = txt.CHARSET) -> str: def run_lines(*tuples, charset: str = txt.CHARSET) -> list[str]: - process = subprocess.run(get_tuples_args(tuples), capture_output=True) + process = subprocess.run(get_tuples_args(tuples), capture_output=True, check=True) string = process.stdout.decode(charset) return string.rstrip().splitlines()