Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture both stdout and stderr of isort command #99

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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