mirror of
https://github.com/mtkennerly/dunamai-action.git
synced 2025-06-20 06:08:03 +00:00
#2: Fix stdout/stderr mixup
This commit is contained in:
parent
c1b34a8a25
commit
63f40be390
1 changed files with 4 additions and 7 deletions
11
action.py
11
action.py
|
@ -23,13 +23,10 @@ def export_variable(name: str, value: str) -> None:
|
||||||
def set_failed(error: Exception) -> None:
|
def set_failed(error: Exception) -> None:
|
||||||
print("::error::{}".format(error))
|
print("::error::{}".format(error))
|
||||||
|
|
||||||
stdout = getattr(error, "stdout", None)
|
for stream_name in ["stdout", "stderr"]:
|
||||||
if stdout is not None:
|
stream = getattr(error, stream_name, None)
|
||||||
print("stdout: {}".format(stdout.decode("utf-8").strip()))
|
if stream is not None:
|
||||||
|
print("{}: {}".format(stream_name, stream.decode("utf-8").strip()))
|
||||||
stderr = getattr(error, "stderr", None)
|
|
||||||
if stderr is not None:
|
|
||||||
print("stderr: {}".format(stdout.decode("utf-8").strip()))
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue