make-tarball.nix: Fix <nixpkgs> check
This was broken by 6bcf194449
, which
caused the result of the check to be ignored (since xargs will return
a non-zero exit status if *any* grep doesn't find a match).
This commit is contained in:
parent
9a8633bb59
commit
5c5223d46b
@ -43,8 +43,10 @@ releaseTools.sourceTarball rec {
|
||||
echo 'abort "Illegal use of <nixpkgs> in Nixpkgs."' > $TMPDIR/barf.nix
|
||||
|
||||
# Make sure that Nixpkgs does not use <nixpkgs>
|
||||
if (find pkgs -type f -name '*.nix' -print | xargs grep '<nixpkgs\/'); then
|
||||
badFiles=$(find pkgs -type f -name '*.nix' -print | xargs grep -l '^[^#]*<nixpkgs\/' || true)
|
||||
if [[ -n $badFiles ]]; then
|
||||
echo "Nixpkgs is not allowed to use <nixpkgs> to refer to itself."
|
||||
echo "The offending files: $badFiles"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user