1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Merge pull request #308 from hardselius/master

Fix nix flake info error
This commit is contained in:
Daiderd Jordan 2021-04-06 09:20:09 +02:00 committed by GitHub
commit a7492a8c76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,7 +126,13 @@ if [ -n "$flake" ]; then
fi
if [ -n "$flake" ]; then
flake=$(nix "${flakeFlags[@]}" flake info --json "${extraBuildFlags[@]}" "${extraLockFlags[@]}" -- "$flake" | jq -r .url)
if nix "${flakeFlags[@]}" flake metadata --version &>/dev/null; then
cmd=metadata
else
cmd=info
fi
flake=$(nix "${flakeFlags[@]}" flake "$cmd" --json "${extraBuildFlags[@]}" "${extraLockFlags[@]}" -- "$flake" | jq -r .url)
fi
if [ "$action" != build ] && [ -z "$flake" ]; then