Skip to content

Improve logging in swift_build_support/shell.py #74592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions utils/swift_build_support/swift_build_support/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def call(command, stderr=None, env=None, dry_run=None, echo=True):
subprocess.check_call(command, env=_env, stderr=stderr)
except subprocess.CalledProcessError as e:
_fatal_error(
"command terminated with a non-zero exit status " +
str(e.returncode) + ", aborting")
f"command `{command}` terminated with a non-zero exit status "
f"{str(e.returncode)}, aborting")
except OSError as e:
_fatal_error(
"could not execute '" + quote_command(command) +
Expand Down Expand Up @@ -138,8 +138,8 @@ def capture(command, stderr=None, env=None, dry_run=None, echo=True,
if optional:
return None
_fatal_error(
"command terminated with a non-zero exit status " +
str(e.returncode) + ", aborting")
f"command `{command}` terminated with a non-zero exit status "
f"{str(e.returncode)}, aborting")
except OSError as e:
if optional:
return None
Expand Down