cmd: Improve error message if config missing

This commit is contained in:
Matthew Holt 2022-09-14 23:24:16 -06:00
parent 0b3161aeea
commit 62b0685375
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -679,7 +679,7 @@ func DetermineAdminAPIAddress(address string, config []byte, configFile, configA
return "", err
}
if loadedConfigFile == "" {
return "", fmt.Errorf("no config file to load")
return "", fmt.Errorf("no config file to load; either use --config flag or ensure Caddyfile exists in current directory")
}
}