LLNL / serac

Serac is a high order nonlinear thermomechanical simulation code
BSD 3-Clause "New" or "Revised" License
178 stars 31 forks source link

Revert usage of `tee` #1101

Closed white238 closed 4 months ago

white238 commented 4 months ago

I'd say this was an elaborate April Fool's Joke but it's just sad.

tee does not forward the error code of the previous command like I assumed and clearly didn't check. My bad.

$ ./error.sh; echo $?
~~~~~~~~ test about to error
1
$ ./error.sh | tee output; echo $?
~~~~~~~~ test about to error
0

There are some very specific to bash ways of handling this, which we can't rely on, or I can jump through some pipe'ing hoops in Python. I'll do the later later.

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.97%. Comparing base (d82e2f7) to head (4e8b85f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1101 +/- ## ======================================== Coverage 86.97% 86.97% ======================================== Files 159 159 Lines 15465 15465 ======================================== Hits 13450 13450 Misses 2015 2015 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

btalamini commented 4 months ago

Yup, good catch. I hate dealing with piping output because it's full of gotchas.