Skip to content

Commit

Permalink
actually don't error out if diff fails
Browse files Browse the repository at this point in the history
Since `set -e` is at the top of the script, we need to explicitly avoid any non-zero return code by using `|| true`.
  • Loading branch information
tomeichlersmith authored Sep 13, 2023
1 parent f297cfa commit 0e8af85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/actions/validate/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ __main__() {

# assume sample directory has its config called 'config.py'
start_group Run config.py
ldmx fire config.py &> output.log || return $?
ldmx fire config.py | tee output.log || return $?
end_group

start_group Compare to Golden Histograms
Expand All @@ -52,7 +52,7 @@ __main__() {
# do not error out if diff is non-zero, the timestamps printed out
# by some processors prevent a full text diff so we do the character
# count check below to look for big changes
diff gold.log output.log > ${_sample_dir}/plots/log.diff
diff gold.log output.log > ${_sample_dir}/plots/log.diff || true

# check character count of logs
ngold=$(wc --chars gold.log)
Expand Down

0 comments on commit 0e8af85

Please sign in to comment.