@@ -17,19 +17,11 @@ import (
17
17
"github.com/getsops/sops/v3/gcpkms"
18
18
"github.com/getsops/sops/v3/hcvault"
19
19
"github.com/getsops/sops/v3/kms"
20
- "github.com/getsops/sops/v3/logging"
21
20
"github.com/getsops/sops/v3/pgp"
22
21
"github.com/getsops/sops/v3/publish"
23
- "github.com/sirupsen/logrus"
24
22
"gopkg.in/yaml.v3"
25
23
)
26
24
27
- var log * logrus.Logger
28
-
29
- func init () {
30
- log = logging .NewLogger ("CONFIG" )
31
- }
32
-
33
25
type fileSystem interface {
34
26
Stat (name string ) (os.FileInfo , error )
35
27
}
@@ -377,19 +369,17 @@ func parseDestinationRuleForFile(conf *configFile, filePath string, kmsEncryptio
377
369
}
378
370
379
371
var dest publish.Destination
380
- if dRule != nil {
381
- if dRule .S3Bucket != "" && dRule .GCSBucket != "" && dRule .VaultPath != "" {
382
- return nil , fmt .Errorf ("error loading config: more than one destinations were found in a single destination rule, you can only use one per rule" )
383
- }
384
- if dRule .S3Bucket != "" {
385
- dest = publish .NewS3Destination (dRule .S3Bucket , dRule .S3Prefix )
386
- }
387
- if dRule .GCSBucket != "" {
388
- dest = publish .NewGCSDestination (dRule .GCSBucket , dRule .GCSPrefix )
389
- }
390
- if dRule .VaultPath != "" {
391
- dest = publish .NewVaultDestination (dRule .VaultAddress , dRule .VaultPath , dRule .VaultKVMountName , dRule .VaultKVVersion )
392
- }
372
+ if dRule .S3Bucket != "" && dRule .GCSBucket != "" && dRule .VaultPath != "" {
373
+ return nil , fmt .Errorf ("error loading config: more than one destinations were found in a single destination rule, you can only use one per rule" )
374
+ }
375
+ if dRule .S3Bucket != "" {
376
+ dest = publish .NewS3Destination (dRule .S3Bucket , dRule .S3Prefix )
377
+ }
378
+ if dRule .GCSBucket != "" {
379
+ dest = publish .NewGCSDestination (dRule .GCSBucket , dRule .GCSPrefix )
380
+ }
381
+ if dRule .VaultPath != "" {
382
+ dest = publish .NewVaultDestination (dRule .VaultAddress , dRule .VaultPath , dRule .VaultKVMountName , dRule .VaultKVVersion )
393
383
}
394
384
395
385
config , err := configFromRule (rule , kmsEncryptionContext )
0 commit comments