mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
shellcheck fix: tests/functional/flakes/show.sh
This commit is contained in:
parent
cb22518754
commit
f596c9b8c3
2 changed files with 7 additions and 3 deletions
|
|
@ -106,7 +106,6 @@
|
|||
enable = true;
|
||||
excludes = [
|
||||
# We haven't linted these files yet
|
||||
''^tests/functional/flakes/show\.sh$''
|
||||
''^tests/functional/formatter\.sh$''
|
||||
''^tests/functional/formatter\.simple\.sh$''
|
||||
''^tests/functional/gc-auto\.sh$''
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ pushd "$flakeDir"
|
|||
# By default: Only show the packages content for the current system and no
|
||||
# legacyPackages at all
|
||||
nix flake show --json > show-output.json
|
||||
# shellcheck disable=SC2016
|
||||
nix eval --impure --expr '
|
||||
let show_output = builtins.fromJSON (builtins.readFile ./show-output.json);
|
||||
in
|
||||
|
|
@ -23,6 +24,7 @@ true
|
|||
|
||||
# With `--all-systems`, show the packages for all systems
|
||||
nix flake show --json --all-systems > show-output.json
|
||||
# shellcheck disable=SC2016
|
||||
nix eval --impure --expr '
|
||||
let show_output = builtins.fromJSON (builtins.readFile ./show-output.json);
|
||||
in
|
||||
|
|
@ -33,6 +35,7 @@ true
|
|||
|
||||
# With `--legacy`, show the legacy packages
|
||||
nix flake show --json --legacy > show-output.json
|
||||
# shellcheck disable=SC2016
|
||||
nix eval --impure --expr '
|
||||
let show_output = builtins.fromJSON (builtins.readFile ./show-output.json);
|
||||
in
|
||||
|
|
@ -80,6 +83,7 @@ cat >flake.nix <<EOF
|
|||
}
|
||||
EOF
|
||||
nix flake show --json --legacy --all-systems > show-output.json
|
||||
# shellcheck disable=SC2016
|
||||
nix eval --impure --expr '
|
||||
let show_output = builtins.fromJSON (builtins.readFile ./show-output.json);
|
||||
in
|
||||
|
|
@ -91,11 +95,12 @@ true
|
|||
# Test that nix flake show doesn't fail if one of the outputs contains
|
||||
# an IFD
|
||||
popd
|
||||
writeIfdFlake $flakeDir
|
||||
pushd $flakeDir
|
||||
writeIfdFlake "$flakeDir"
|
||||
pushd "$flakeDir"
|
||||
|
||||
|
||||
nix flake show --json > show-output.json
|
||||
# shellcheck disable=SC2016
|
||||
nix eval --impure --expr '
|
||||
let show_output = builtins.fromJSON (builtins.readFile ./show-output.json);
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue