1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

shellcheck fix: tests/functional/path-from-hash-part.sh

This commit is contained in:
Farid Zakaria 2025-09-30 19:53:33 -07:00
parent 32cbf5f55a
commit 112c9d8f54
2 changed files with 3 additions and 4 deletions

View file

@ -106,7 +106,6 @@
enable = true;
excludes = [
# We haven't linted these files yet
''^tests/functional/path-from-hash-part\.sh$''
''^tests/functional/path-info\.sh$''
''^tests/functional/placeholders\.sh$''
''^tests/functional/post-hook\.sh$''

View file

@ -4,9 +4,9 @@ source common.sh
path=$(nix build --no-link --print-out-paths -f simple.nix)
hash_part=$(basename $path)
hash_part=$(basename "$path")
hash_part=${hash_part:0:32}
path2=$(nix store path-from-hash-part $hash_part)
path2=$(nix store path-from-hash-part "$hash_part")
[[ $path = $path2 ]]
[[ $path = "$path2" ]]