summaryrefslogtreecommitdiff
path: root/cmd/main.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2022-09-01 21:41:09 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2022-09-01 21:43:23 -0600
commitec2a5762b03356aa3b59714d51fd969e9bf3f6e3 (patch)
treeb2f89ac4b8437d45439d221cf585ae386d5b420c /cmd/main.go
parente77992dd99509c883dbb3b6dd185f771a42e5fae (diff)
cmd: Don't print long help text on error
Diffstat (limited to 'cmd/main.go')
-rw-r--r--cmd/main.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd/main.go b/cmd/main.go
index 44e339a..b91559c 100644
--- a/cmd/main.go
+++ b/cmd/main.go
@@ -51,12 +51,9 @@ func init() {
// Main implements the main function of the caddy command.
// Call this if Caddy is to be the main() of your program.
func Main() {
- switch len(os.Args) {
- case 0:
+ if len(os.Args) == 0 {
fmt.Printf("[FATAL] no arguments provided by OS; args[0] must be command\n")
os.Exit(caddy.ExitCodeFailedStartup)
- case 1:
- os.Args = append(os.Args, "help")
}
if err := rootCmd.Execute(); err != nil {