diff options
author | Silvan Mosberger <silvan.mosberger@tweag.io> | 2024-01-29 13:39:26 +0100 |
---|---|---|
committer | Silvan Mosberger <silvan.mosberger@tweag.io> | 2024-01-29 13:39:26 +0100 |
commit | 142922295dffd81b9e7efb35af5ba79461513d44 (patch) | |
tree | 948cb31b2ce9b33e7b2e4821c9854aade9317137 /pkgs/test | |
parent | 9c149d289e9d862eccae916edbdb62d1b1f1f807 (diff) |
check-by-name: Don't use -I in shebang
Original commit from https://github.com/NixOS/nixpkgs/pull/282226, message: Running CI locally is broken becauses the `-I` argument: - Clobbers $NIX_PATH - Is wrong for two reasons: - Has too many `..` elements, relative to the script's location - Isn't relative to the script's location (as with *.nix files), since shell scripts and POSIX in general interpret paths relative to the current working directory, not the canonical path of argv[0] - Is inconsistent, since this script has symlinks pointing at it from different depths in the repository There is no way to set this flag statically in a way that will work everywhere. The caller needs to use $NIX_PATH, or the script needs to take the `-I` value as an argument. This commit deletes the static `-I` flag.
Diffstat (limited to 'pkgs/test')
-rwxr-xr-x | pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh | 2 | ||||
-rwxr-xr-x | pkgs/test/nixpkgs-check-by-name/scripts/update-pinned-tool.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh b/pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh index 1dd52293cc7e6..46cbd5e858e29 100755 --- a/pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh +++ b/pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p jq -I nixpkgs=../../../.. +#!nix-shell -i bash -p jq set -o pipefail -o errexit -o nounset diff --git a/pkgs/test/nixpkgs-check-by-name/scripts/update-pinned-tool.sh b/pkgs/test/nixpkgs-check-by-name/scripts/update-pinned-tool.sh index b2bc629e86604..dbc6e91df08a6 100755 --- a/pkgs/test/nixpkgs-check-by-name/scripts/update-pinned-tool.sh +++ b/pkgs/test/nixpkgs-check-by-name/scripts/update-pinned-tool.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p jq -I nixpkgs=../../../.. +#!nix-shell -i bash -p jq set -o pipefail -o errexit -o nounset |