Support store settings (#28)
This commit is contained in:
@@ -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(
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user