1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 06:53:54 +02:00

Merge pull request #7609 from obsidiansystems/hide-experimental-settings

Hide experimental settings
This commit is contained in:
John Ericson 2023-03-27 09:19:29 -04:00 committed by GitHub
commit 570829d67e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 223 additions and 101 deletions

View file

@ -0,0 +1,23 @@
source common.sh
# Without flakes, flake options should not show up
# With flakes, flake options should show up
function both_ways {
nix --experimental-features 'nix-command' "$@" | grepQuietInverse flake
nix --experimental-features 'nix-command flakes' "$@" | grepQuiet flake
# Also, the order should not matter
nix "$@" --experimental-features 'nix-command' | grepQuietInverse flake
nix "$@" --experimental-features 'nix-command flakes' | grepQuiet flake
}
# Simple case, the configuration effects the running command
both_ways show-config
# Complicated case, earlier args effect later args
both_ways store gc --help
expect 1 nix --experimental-features 'nix-command' show-config --flake-registry 'https://no'
nix --experimental-features 'nix-command flakes' show-config --flake-registry 'https://no'

View file

@ -18,6 +18,7 @@ nix_tests = \
gc.sh \
remote-store.sh \
lang.sh \
experimental-features.sh \
fetchMercurial.sh \
gc-auto.sh \
user-envs.sh \