-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
bug 🐞Something isn't workingSomething isn't workinggood first issue 🐤Good for newcomersGood for newcomers
Description
I think this is pretty self-explanatory:
$ caddy adapt
Error: input file required when there is no Caddyfile in current directory (use --config flag)
$ caddy validate
Error: decoding config: unexpected end of JSON input
The validate
command, unlike adapt
misses check that assesses the file even exists in the first place. With that, the user may assume the file was read and that they have some syntax error they'll be endlessly looking for, even though that's not the problem...
Check for adapt exists here:
Lines 439 to 442 in dfe17c3
if adaptCmdInputFlag == "" { | |
return caddy.ExitCodeFailedStartup, | |
fmt.Errorf("input file required when there is no Caddyfile in current directory (use --config flag)") | |
} |
Missing in this func:
Line 506 in dfe17c3
func cmdValidateConfig(fl Flags) (int, error) { |
Should be simple fix for someone who already has a dev environment setup to test it out before committing (hence I'm creating an issue and not PR)
mholt
Metadata
Metadata
Assignees
Labels
bug 🐞Something isn't workingSomething isn't workinggood first issue 🐤Good for newcomersGood for newcomers