diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 7082c86a2d2a..01675ed02a78 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -210,7 +210,7 @@ else # If the hash was given, a file with that hash may already be in the # store. - if -n "$expHash"; then + if test -n "$expHash"; then finalPath=$(nix-store --print-fixed-path --recursive "$hashType" "$expHash" git-export) if ! nix-store --check-validity "$finalPath" 2> /dev/null; then finalPath= @@ -251,4 +251,4 @@ else if test -n "$PRINT_PATH"; then echo $finalPath fi -fi \ No newline at end of file +fi