filter .json in confDir

pull/2148/head
vcptr 5 years ago
parent 5ae47d45c2
commit c3f55dcd67

@ -41,7 +41,9 @@ func (c *ConfigCommand) Execute(args []string) error {
r, err := c.LoadArg(arg)
common.Must(err)
c, err := serial.DecodeJSONConfig(r)
common.Must(err)
if err != nil {
ctllog.Fatalln(err)
}
conf.Override(c, arg)
}

@ -46,9 +46,11 @@ func readConfDir(dirPath string) {
log.Fatalln(err)
}
for _, f := range confs {
if strings.HasSuffix(f.Name(), ".json") {
configFiles.Set(path.Join(dirPath, f.Name()))
}
}
}
func getConfigFilePath() (cmdarg.Arg, error) {
if dirExists(configDir) {

Loading…
Cancel
Save