about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2022-05-18 20:00:44 +0300
committerGitHub <noreply@github.com>2022-05-18 20:00:44 +0300
commitca714e40fbb27e025d81ef8c96c9af0f7782b9a0 (patch)
treed623f6a381ad72248dfb0c6d524eacbd9e788ef9 /pkgs/build-support
parent8ccfb5b4ebafd30247ca528cb869059954f3f0e2 (diff)
parenta23fbeb6e8d5c7f35c9feba25da0061ebcf79efe (diff)
Merge pull request #172946 from Artturin/tester1
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/testers/default.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/build-support/testers/default.nix b/pkgs/build-support/testers/default.nix
index 3ab97760e725d..020352836c899 100644
--- a/pkgs/build-support/testers/default.nix
+++ b/pkgs/build-support/testers/default.nix
@@ -9,10 +9,19 @@
       version ? package.version,
     }: runCommand "${package.name}-test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } ''
       if output=$(${command} 2>&1); then
-        grep -Fw "${version}" - <<< "$output"
-        touch $out
+        if grep -Fw "${version}" - <<< "$output"; then
+          touch $out
+        else
+          echo "Version string '${version}' not found!" >&2
+          echo "The output was:" >&2
+          echo "$output" >&2
+          exit 1
+        fi
       else
-        echo "$output" >&2 && exit 1
+        echo -n ${lib.escapeShellArg command} >&2
+        echo " returned a non-zero exit code." >&2
+        echo "$output" >&2
+        exit 1
       fi
     '';