Fix goaccess -h/--help exit-code

(cherry picked from commit 867e181b83db2309180078bb889d1db86bf97972)
This commit is contained in:
baizg1107 2021-10-08 18:40:05 +08:00 committed by openeuler-sync-bot
parent 1109c2f1bf
commit dc67c33cb1
2 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,25 @@
From 40522f4cb1b4825a168639563aa0ff3750a0d393 Mon Sep 17 00:00:00 2001
From: baizg1107 <preloyalwhite@163.com>
Date: Fri, 8 Oct 2021 18:34:35 +0800
Subject: [PATCH] Fix usage exit code
---
src/options.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/options.c b/src/options.c
index cea991f..9025914 100644
--- a/src/options.c
+++ b/src/options.c
@@ -288,7 +288,7 @@ cmd_help (void)
"\n\n"
, INFO_HELP_EXAMPLES, INFO_MORE_INFO, GO_WEBSITE
);
- exit (EXIT_FAILURE);
+ exit (EXIT_SUCCESS);
}
/* *INDENT-ON* */
--
2.27.0

View File

@ -6,11 +6,12 @@
%endif %endif
Name: goaccess Name: goaccess
Version: 1.4.6 Version: 1.4.6
Release: 1 Release: 2
Summary: Real-time web log analyzer and interactive viewer Summary: Real-time web log analyzer and interactive viewer
License: GPLv2+ License: GPLv2+
URL: https://goaccess.io/ URL: https://goaccess.io/
Source0: https://tar.goaccess.io/%{name}-%{version}.tar.gz Source0: https://tar.goaccess.io/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-usage-exit-code.patch
BuildRequires: autoconf automake gcc GeoIP-devel ncurses-devel gettext-devel BuildRequires: autoconf automake gcc GeoIP-devel ncurses-devel gettext-devel
%if %{with openssl} %if %{with openssl}
BuildRequires: openssl-devel BuildRequires: openssl-devel
@ -22,7 +23,7 @@ terminal in *nix systems. It provides fast and valuable HTTP statistics for
system administrators that require a visual server report on the fly. system administrators that require a visual server report on the fly.
%prep %prep
%autosetup %autosetup -p1
sed -i '/-pthread/d' configure.ac sed -i '/-pthread/d' configure.ac
%build %build
@ -47,5 +48,8 @@ sed -i '/-pthread/d' configure.ac
%{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}.1*
%changelog %changelog
* Fri Oct 8 2021 baizhonggui <baizhonggui@huawei.com> - 1.4.6-2
- Fix goaccess -h/--help exit-code: 1 to 0
* Tue Sep 7 2021 zhengyaohui <zhengyaohui1@huawei.com> - 1.4.6-1 * Tue Sep 7 2021 zhengyaohui <zhengyaohui1@huawei.com> - 1.4.6-1
- package init - package init