Merge pull request #134 from trail-of-forks/tob-better-errors

oidc-exchange: avoid splitting the error message
This commit is contained in:
Sviatoslav Sydorenko 2023-03-21 23:13:05 +01:00 committed by GitHub
commit f3ce18f699
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)