From 9a1370c2c8fb2c52585971d9eaa6f0c4383cb869 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 22 Jan 2020 09:33:22 -0700 Subject: cmd: Make --config flag optional for reload command In case it is using the default Caddyfile --- cmd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/main.go') diff --git a/cmd/main.go b/cmd/main.go index 54d11d8..35f4210 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -97,7 +97,7 @@ func handlePingbackConn(conn net.Conn, expect []byte) error { // the resulting JSON config bytes. func loadConfig(configFile, adapterName string) ([]byte, error) { // specifying an adapter without a config file is ambiguous - if configFile == "" && adapterName != "" { + if adapterName != "" && configFile == "" { return nil, fmt.Errorf("cannot adapt config without config file (use --config)") } -- cgit v1.2.3