Skip to content

Commit

Permalink
Simplify message to avoid showing filename=None
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Apr 14, 2023
1 parent 8c11fff commit 2d0a40c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pyscaffold/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ def __call__(self, *args, **kwargs) -> Iterator[str]:
try:
completed = self.run(*args, **kwargs)
except FileNotFoundError as e:
msg = f"{e.strerror}: {e.filename}"
logger.report("info", f'last command failed with "{msg}"')
raise ShellCommandException(msg) from e
logger.report("info", f'last command failed with "{e!s}"')
raise ShellCommandException(str(e)) from e

try:
completed.check_returncode()
Expand Down

0 comments on commit 2d0a40c

Please sign in to comment.