Skip to content

Commit

Permalink
Capture both stdout and stderr of isort command (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescurtin authored Oct 15, 2024
1 parent 314ebe9 commit e6ee1f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Packages are installed into a virtualenv due to the fact that system-wide
installs fail by default when run on newer versions of Python.
- Print stderr to console when action fails.

## [1.1.0] - 2022-11-04

Expand Down
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 e6ee1f2

Please sign in to comment.