From 3f323d74d634a975bf4a71a1cda632c212c7f163 Mon Sep 17 00:00:00 2001 From: milahu Date: Sat, 5 Feb 2022 14:32:54 +0100 Subject: [PATCH] nixpkgs-basic-release-checks.nix: print errors --- .../nixpkgs-basic-release-checks.nix | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pkgs/top-level/nixpkgs-basic-release-checks.nix b/pkgs/top-level/nixpkgs-basic-release-checks.nix index 441f9b33823b..28f8cf332977 100644 --- a/pkgs/top-level/nixpkgs-basic-release-checks.nix +++ b/pkgs/top-level/nixpkgs-basic-release-checks.nix @@ -30,12 +30,22 @@ pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; } # Relies on impure eval export NIX_ABORT_ON_WARN=true - nix-env -f $src \ - --show-trace --argstr system "$platform" \ - --arg config '{ allowAliases = false; }' \ - --option experimental-features 'no-url-literals' \ - -qa --drv-path --system-filter \* --system \ - "''${opts[@]}" 2> eval-warnings.log > packages1 + set +e + ( + set -x + nix-env -f $src \ + --show-trace --argstr system "$platform" \ + --arg config '{ allowAliases = false; }' \ + --option experimental-features 'no-url-literals' \ + -qa --drv-path --system-filter \* --system \ + "''${opts[@]}" 2> eval-warnings.log > packages1 + ) + rc=$? + set -e + if [ "$rc" != "0" ]; then + cat eval-warnings.log + exit $rc + fi s1=$(sha1sum packages1 | cut -c1-40) echo $s1