aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gg.14
-rw-r--r--gg.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/gg.1 b/gg.1
index 3f0acad..6f62e68 100644
--- a/gg.1
+++ b/gg.1
@@ -11,7 +11,7 @@
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.Dd $Mdocdate: January 30 2022$
+.Dd $Mdocdate: October 17 2023$
.Dt GG 1
.Os
.Sh NAME
@@ -92,6 +92,8 @@ after
The
.Nm
utility exits with zero if the response code was in the 2x range.
+If a failure occurs, it exits with status code 1.
+Otherwise, the error code reflects the Gemini response code.
.Sh ACKNOWLEDGEMENTS
.Nm
uses the
diff --git a/gg.c b/gg.c
index 6b3830d..6f2ee68 100644
--- a/gg.c
+++ b/gg.c
@@ -428,6 +428,7 @@ main(int argc, char **argv)
#endif
code = get(*argv);
-
- return code < 20 || code >= 30;
+ if (code >= 20 && code < 30)
+ return 0;
+ return code;
}