summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-12-12 14:30:22 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2019-12-12 14:30:22 -0700
commitf935458e3e30a8d9f47f37ad35fe9c546b841fa3 (patch)
tree25c2e6365d8f1934bd9cb5b9e8faeee0b8a2ce3f /cmd
parent2e0615270d157beb293bfce832a8a39bc6f2e749 (diff)
cmd: Fix validate command when JSON contains "@id" fields
Also, don't run admin server when validating...
Diffstat (limited to 'cmd')
-rw-r--r--cmd/commandfuncs.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go
index 8526372..3cba47a 100644
--- a/cmd/commandfuncs.go
+++ b/cmd/commandfuncs.go
@@ -465,6 +465,8 @@ func cmdValidateConfig(fl Flags) (int, error) {
input = adaptedConfig
}
+ input = caddy.RemoveMetaFields(input)
+
var cfg *caddy.Config
err = json.Unmarshal(input, &cfg)
if err != nil {