https://bugzilla.redhat.com/show_bug.cgi?id=2091389



--- Comment #11 from Jonathan Wakely <[email protected]> ---
(In reply to Benson Muite from comment #10)
> The exit code of 2 causes the build to fail, even if the output is piped
> elsewhere.

No, it works fine:

+ cd uacme-upstream-1.7.1
+ /builddir/build/BUILDROOT/uacme-1.7.1-1.fc38.x86_64/usr/bin/uacme --version
+ grep 'uacme: version 1.7.1'
uacme: version 1.7.1
+ RPM_EC=0
++ jobs -p
+ exit 0

> Trying ignoring the exit code, capturing the value and then
> checking if it is the expected value.

If you insist, then you can do this:

%check
(${RPM_BUILD_ROOT}%{_bindir}/%{name} --version 2>&1 || true) | grep 'uacme:
version %version'

The subshell exits with status 0 here.


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2091389
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to