Skip to contentSkip to conversation

toaster: --help now returns 0 instead of 1

PATCH New Randy Witt 1 participant 1 message Aug 2, 2016

lore
Share & tools
lore

Randy Witt

author
#0 lore raw

PATCH 1/1 toaster: --help now returns 0 instead of 1

If the user explicitly passes in "--help" then it should return 0. This is the convention follow by the typical application. This allows the user to check for options without triggering an error.

---
 bin/toaster | 4 ++++
 1 file changed, 4 insertions(+)
bin/toaster +4 -0
index e3a0dae..79ab301 100755
@@ -203,6 +203,10 @@ for param in $*; do
                 ADDR_PORT="localhost:$PORT"
             fi
     ;;
+    --help)
+            echo "$HELP"
+            return 0
+    ;;
     *)
             echo "$HELP"
             return 1
Signature · 1 line
2.7.4