Skip to content

Commit

Permalink
Merge pull request #156 from trail-of-forks/tob-fix-annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed May 17, 2023
2 parents a56da0b + 3063966 commit f9ed8ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oidc-exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ def die(msg: str) -> NoReturn:
with _GITHUB_STEP_SUMMARY.open("a", encoding="utf-8") as io:
print(_ERROR_SUMMARY_MESSAGE.format(message=msg), file=io)

# HACK: GitHub Actions' annotations don't work across multiple lines naively;
# translating `\n` into `%0A` (i.e., HTML percent-encoding) is known to work.
# See: https://github.com/actions/toolkit/issues/193
msg = msg.replace("\n", "%0A")
print(f"::error::Trusted publishing exchange failure: {msg}", file=sys.stderr)
sys.exit(1)

Expand Down

0 comments on commit f9ed8ba

Please sign in to comment.