diff options
author | Artturi <Artturin@artturin.com> | 2022-05-18 20:00:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-18 20:00:44 +0300 |
commit | ca714e40fbb27e025d81ef8c96c9af0f7782b9a0 (patch) | |
tree | d623f6a381ad72248dfb0c6d524eacbd9e788ef9 /pkgs/build-support | |
parent | 8ccfb5b4ebafd30247ca528cb869059954f3f0e2 (diff) | |
parent | a23fbeb6e8d5c7f35c9feba25da0061ebcf79efe (diff) |
Merge pull request #172946 from Artturin/tester1
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/testers/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/build-support/testers/default.nix b/pkgs/build-support/testers/default.nix index 3ab97760e725..020352836c89 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 ''; |