fix(config): use extension of remote config

This commit is contained in:
Jan De Dobbeleer 2023-01-12 15:10:17 +01:00 committed by Jan De Dobbeleer
parent 1df98df6a6
commit 4024632781

View file

@ -289,7 +289,8 @@ func (env *Shell) resolveConfigPath() {
func (env *Shell) downloadConfig(location string) error {
defer env.Trace(time.Now(), "downloadConfig", location)
configPath := filepath.Join(env.CachePath(), "config.omp.json")
ext := filepath.Ext(location)
configPath := filepath.Join(env.CachePath(), "config.omp"+ext)
cfg, err := env.HTTPRequest(location, nil, 5000)
if err != nil {
return err