summaryrefslogtreecommitdiff
path: root/cmd/main.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-01-22 09:33:22 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2020-01-22 09:33:22 -0700
commit9a1370c2c8fb2c52585971d9eaa6f0c4383cb869 (patch)
tree828aeee845d6e5fca83050c1e51557a5e996051b /cmd/main.go
parentd810637a9fe2d2015b1f5ad701fdc23f26dda66a (diff)
cmd: Make --config flag optional for reload command
In case it is using the default Caddyfile
Diffstat (limited to 'cmd/main.go')
-rw-r--r--cmd/main.go2
1 files changed, 1 insertions, 1 deletions
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)")
}