Skip to content

Commit 57baf7f

Browse files
committed
fix: non exiting of failed action
1 parent d765304 commit 57baf7f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

run/_run.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ function run() {
88

99
echo "::debug::Running $(basename $BASH_SOURCE):run()"
1010
11-
local action drv name
11+
local action drv cell block target
1212
13-
jq -r '.action + " " + .name + " " + .actionDrv' <<<"$JSON" | read -r action name drv
13+
jq -r '.action + " " + .name + " " + .cell + " " + .block + " " + .actionDrv' <<<"$JSON" | read -r action target cell block drv
1414
15-
echo "::group::🏍️️ $action $name"
15+
echo "::group::🏍️️ $action //$cell/$block/$target"
1616
1717
if [[ -z $BUILT ]]; then
1818
# should be fetched, since we have already checked cache status in build step
@@ -22,12 +22,13 @@ function run() {
2222
fi
2323
2424
out="$(nix show-derivation "$drv" | jq -r '.[].outputs.out.path')"
25-
if [[ -e $out ]]; then
26-
"$out"
27-
else
25+
if [[ ! -e $out ]]; then
2826
nix-build "$drv" --no-out-link
29-
"$out"
3027
fi
28+
29+
# this trick preserves set -e & set -o pipefail from above
30+
function _run() { . "$out"; }
31+
_run
3132
}
3233
3334
run

0 commit comments

Comments
 (0)