diff options
author | Mateusz Piotrowski <0mp@FreeBSD.org> | 2020-09-28 15:23:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 15:23:21 +0200 |
commit | ed66d010659a710646f5f1015c97a58614a713b3 (patch) | |
tree | 432140926e0c023ce42ed2f42111f1dc206c5a62 /tests | |
parent | 649c465873b20465590d3934fdc0672e4b6b826a (diff) |
Fix tar invocation on FreeBSD
tar(1) on FreeBSD does not use standard output or input when the -f flag
is not provided. Instead, it defaults to /dev/sa0 on FreeBSD.
Make this tar invocation a bit more robust and explicitly tell tar(1) to
use standard output.
This is one of the issues discovered while porting Nix to FreeBSD. It has
been tested and committed locally to FreeBSD ports:
https://svnweb.freebsd.org/ports/head/sysutils/nix/Makefile?revision=550026&view=markup#l108
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tarball.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/tarball.sh b/tests/tarball.sh index 88a1a07a0..fe65a22e4 100644 --- a/tests/tarball.sh +++ b/tests/tarball.sh @@ -17,7 +17,7 @@ test_tarball() { local compressor="$2" tarball=$TEST_ROOT/tarball.tar$ext - (cd $TEST_ROOT && tar c tarball) | $compressor > $tarball + (cd $TEST_ROOT && tar cf - tarball) | $compressor > $tarball nix-env -f file://$tarball -qa --out-path | grep -q dependencies |