Skip to content

Commit

Permalink
keep exit code of 1 even with tee
Browse files Browse the repository at this point in the history
  • Loading branch information
lldelisle committed Sep 26, 2024
1 parent a5ad00c commit 7e11d11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ jobs:
echo "Running autoupdate command..."
cd "$REPO"
# This may fail
# To get an exit code of 1 even with tee:
set -o pipefail
planemo autoupdate . --skiplist "${{ github.workspace }}/autoupdate/${{ matrix.upstream_repo_owner }}_${{ matrix.upstream_repo_name }}_skip_list" 2>&1 1> "${{ github.workspace }}/autoupdate.log" | tee "${{ github.workspace }}/autoupdate.err" || errors="${errors}\nCannot autoupdate $REPO, last line of stderr is\n$(tail -n 1 "${{ github.workspace }}/autoupdate.err")"
# Restore
set +o pipefail
# Waiting for https://github.com/galaxyproject/planemo/issues/1478 to be solved
if [[ "$(tail -n 1 "${{ github.workspace }}/autoupdate.log")" = "Could not update"* ]]; then
errors="${errors}\n$(tail -n 1 "${{ github.workspace }}/autoupdate.log")\n$(tail -n 1 "${{ github.workspace }}/autoupdate.err")"
Expand Down

0 comments on commit 7e11d11

Please sign in to comment.