Skip to content

Commit

Permalink
fix(discover): error if eval fails
Browse files Browse the repository at this point in the history
  • Loading branch information
nrdxp committed Jan 5, 2023
1 parent 0a2eaf9 commit 0ac0efd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion discover/eval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ function eval() {
local system

system="$(nix eval --raw --impure --expr 'builtins.currentSystem')"
mapfile -t LIST < <(nix eval "$FLAKE#__std.ci'.$system" --json | jq -c 'unique_by(.actionDrv)|.[]')
mapfile -t LIST < <(nix eval "$FLAKE#__std.ci'.$system" --show-trace --json | jq -c 'unique_by(.actionDrv)|.[]')

if [[ -z ${LIST[*]} ]]; then
>&2 echo "Evaluation has failed, please review the trace; exiting..."
exit 1
fi

echo "::endgroup::"
}
Expand Down

0 comments on commit 0ac0efd

Please sign in to comment.