diff options
author | Ammar Faizi <ammarfaizi2@gnuweeb.org> | 2022-04-01 14:07:43 +0300 |
---|---|---|
committer | Ammar Faizi <ammarfaizi2@gnuweeb.org> | 2022-04-01 23:23:02 +0700 |
commit | 30830bddbfbe9503836bdcb3ed90ec3f945d122d (patch) | |
tree | 0102dd2d49fa94c988904c53158cb9d560d85fd8 /configure | |
parent | 3b52ae980c41b420592e3005199041890a56d6dc (diff) | |
download | liburing-30830bddbfbe9503836bdcb3ed90ec3f945d122d.tar.gz liburing-30830bddbfbe9503836bdcb3ed90ec3f945d122d.tar.bz2 |
configure: Allow the configure script to fail with a non-zero exit code
For poorly configured environments, configure may fail but will still
exit with code 0. This, in turn, causes cryptic build errors later.
Fix this by adding "set -e". Also, append "|| true" to prevent the
`expr` command breaks because it will return a non-zero exit code if
the regex doesn't match.
Closes: https://github.com/axboe/liburing/pull/553
Co-authored-by: Roman Gershman <romange@gmail.com>
Signed-off-by: Roman Gershman <romange@gmail.com>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,10 +1,12 @@ #!/bin/sh +set -e + cc=${CC:-gcc} cxx=${CXX:-g++} for opt do - optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)') + optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)' || true) case "$opt" in --help|-h) show_help=yes ;; |