1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-09 03:43:54 +02:00

Validate tarball components

This commit is contained in:
Eelco Dolstra 2019-12-13 18:11:37 +01:00
parent 4581159e3f
commit 5a6d6da7ae
5 changed files with 27 additions and 5 deletions

BIN
tests/bad.tar.xz Normal file

Binary file not shown.

View file

@ -35,3 +35,8 @@ test_tarball() {
test_tarball '' cat
test_tarball .xz xz
test_tarball .gz gzip
rm -rf $TEST_ROOT/tmp
mkdir -p $TEST_ROOT/tmp
(! TMPDIR=$TEST_ROOT/tmp XDG_RUNTIME_DIR=$TEST_ROOT/tmp nix-env -f file://$(pwd)/bad.tar.xz -qa --out-path)
(! [ -e $TEST_ROOT/tmp/bad ])