Skip to content

Commit f9ed8ba

Browse files
authored
Merge pull request #156 from trail-of-forks/tob-fix-annotation
2 parents a56da0b + 3063966 commit f9ed8ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

oidc-exchange.py

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def die(msg: str) -> NoReturn:
7474
with _GITHUB_STEP_SUMMARY.open("a", encoding="utf-8") as io:
7575
print(_ERROR_SUMMARY_MESSAGE.format(message=msg), file=io)
7676

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

0 commit comments

Comments
 (0)