mirror of
https://github.com/numtide/nixos-anywhere.git
synced 2024-09-11 13:15:44 +03:00
terraform/nix-build: fix building from non-flake
This commit is contained in:
parent
23bbd22fb2
commit
2abdb32c67
@ -3,7 +3,7 @@ set -efu
|
||||
|
||||
declare file attribute
|
||||
eval "$(jq -r '@sh "attribute=\(.attribute) file=\(.file)"')"
|
||||
if [[ -e ${file+x} ]]; then
|
||||
if [[ -n ${file-} ]] && [[ -e ${file-} ]]; then
|
||||
out=$(nix build --no-link --json -f "$file" "$attribute")
|
||||
printf '%s' "$out" | jq -c '.[].outputs'
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user