Commit 18931cb
committed
Do not hide the return code of
The wrapper script for the `context2csv` command should return the same
error code as the command itself.
We can't do that by using `set -e`, because then any error in
`context2csv` would cause the wrapper to immediately exit without
removing the temporary file. And using `trap` to make sure the file is
always removed regardless of how the script terminates could make the
script less portable (I don't remember how well `trap` is supported in
the various shells out there, and I can't be bothered to check right
now). So we simply capture the return code of `context2csv`, remove the
intermediate file, and explicitly exits the wrapper with the captured
return code.context2csv.1 parent 8b9db1e commit 18931cb
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
0 commit comments