Skip to content

Commit

Permalink
Capture both stdout and stderr of isort command
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescurtin committed Oct 15, 2024
1 parent 314ebe9 commit 092c102
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/run_isort
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source "${HOME}/isort-venv/bin/activate"

echo "Running isort $*"
isort_result=$(isort "$@")
isort_result=$(isort "$@" 2>&1)
exit_code=$?

# The isort output can be a multiline string. By default, GITHUB_OUTPUT expects
Expand All @@ -31,4 +31,5 @@ DELIMITER=$(
echo "${DELIMITER}"
} >> "${GITHUB_OUTPUT}"

echo "${isort_result}"
exit $exit_code

0 comments on commit 092c102

Please sign in to comment.