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

Add nix flags to subcommand test

This change removes the need for having

  experimental-features = nix-command flakes

in nix.conf. It should also work outside of flake directories.
This commit is contained in:
Martin Hardselius 2021-03-23 09:49:47 +01:00
parent 4187519820
commit 1f8eb9b128
No known key found for this signature in database
GPG key ID: D25BE60D74E50F68

View file

@ -126,7 +126,7 @@ if [ -n "$flake" ]; then
fi
if [ -n "$flake" ]; then
if nix flake metadata &>/dev/null; then
if nix "${flakeFlags[@]}" flake metadata --version &>/dev/null; then
cmd=metadata
else
cmd=info