Skip to content

Commit

Permalink
Merge pull request #134 from trail-of-forks/tob-better-errors
Browse files Browse the repository at this point in the history
oidc-exchange: avoid splitting the error message
  • Loading branch information
webknjaz authored Mar 21, 2023
2 parents a3a3baf + ea29ccc commit f3ce18f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions oidc-exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ def die(msg: str) -> NoReturn:
with _GITHUB_STEP_SUMMARY.open("a", encoding="utf-8") as io:
print(msg, file=io)

# NOTE: `msg` is Markdown formatted, so we emit only the header line to
# avoid clogging the console log with a full Markdown formatted document.
header = msg.splitlines()[0]
print(f"::error::OIDC exchange failure: {header}", file=sys.stderr)
print(f"::error::OIDC exchange failure: {msg}", file=sys.stderr)
sys.exit(1)


Expand Down

0 comments on commit f3ce18f

Please sign in to comment.