fix: Fail if build fails!
The pipefail option does not catch usage from subshells like this: ``` echo <<<"$(echo foo; exit 1)" ``` Since that's how `nix develop` is called in the script, when the action could not build an environment, it would still be treated as having run successfully, and the job would continue. It's still hypothetically possible for this to happen if `env` or `bash -c 'echo $PATH'` fail. Seems unlikely! But maybe there's something to be done there.
This commit is contained in:
parent
f33559582d
commit
2cd3e161f5
1 changed files with 2 additions and 0 deletions
|
@ -9,6 +9,8 @@ with_nix_develop() {
|
||||||
nix develop --ignore-environment "${arguments[@]}" --command "$@"
|
nix develop --ignore-environment "${arguments[@]}" --command "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
with_nix_develop true # Exit immediately if build fails
|
||||||
|
|
||||||
contains() {
|
contains() {
|
||||||
grep "$1" --silent <<<"$2"
|
grep "$1" --silent <<<"$2"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue