mirror of
https://github.com/NixOS/nix
synced 2025-07-10 04:43:53 +02:00
Don't dereference top-level regular files
Since this yielded an empty directory as far back as Nix 2.3, we don't really need special handling for executables vs non-executables.
This commit is contained in:
parent
e0012b97ab
commit
7c18b4d060
3 changed files with 3 additions and 17 deletions
|
@ -92,15 +92,7 @@ path="$(nix flake prefetch --json "tarball+file://$TEST_ROOT/tar.tar" | jq -r .s
|
|||
[[ -d "$path/foo" ]]
|
||||
[[ -d "$path/bar" ]]
|
||||
|
||||
# Test a tarball that has a single non-executable regular file.
|
||||
rm -rf "$TEST_ROOT/tar_root"
|
||||
mkdir -p "$TEST_ROOT/tar_root"
|
||||
echo bar > "$TEST_ROOT/tar_root/foo"
|
||||
tar cvf "$TEST_ROOT/tar.tar" -C "$TEST_ROOT/tar_root" .
|
||||
path="$(nix flake prefetch --refresh --json "tarball+file://$TEST_ROOT/tar.tar" | jq -r .storePath)"
|
||||
[[ $(cat "$path") = bar ]]
|
||||
|
||||
# Test a tarball that has a single executable regular file.
|
||||
# Test a tarball that has a single regular file.
|
||||
rm -rf "$TEST_ROOT/tar_root"
|
||||
mkdir -p "$TEST_ROOT/tar_root"
|
||||
echo bar > "$TEST_ROOT/tar_root/foo"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue