mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-08-16 03:40:36 +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