diff --git a/request/fetch.go b/request/fetch.go index db6070e..07ec53e 100644 --- a/request/fetch.go +++ b/request/fetch.go @@ -64,8 +64,13 @@ func fetchDecryptedContents(request *request) { } store.Path = normalizedStorePath - gpgPath := request.Settings.GpgPath - if gpgPath != "" { + var gpgPath string + if store.Settings.GpgPath != "" || request.Settings.GpgPath != "" { + if store.Settings.GpgPath != "" { + gpgPath = store.Settings.GpgPath + } else { + gpgPath = request.Settings.GpgPath + } err = validateGpgBinary(gpgPath) if err != nil { log.Errorf( diff --git a/request/process.go b/request/process.go index a729dd4..0182bfa 100644 --- a/request/process.go +++ b/request/process.go @@ -11,10 +11,15 @@ import ( log "github.com/sirupsen/logrus" ) +type storeSettings struct { + GpgPath string `json:"gpgPath"` +} + type store struct { - ID string `json:"id"` - Name string `json:"name"` - Path string `json:"path"` + ID string `json:"id"` + Name string `json:"name"` + Path string `json:"path"` + Settings storeSettings `json:"settings"` } type settings struct {