File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,9 @@ func runConfig(
84
84
case len (c .key ) > 0 :
85
85
k , err := config .GetConfigVar (ctx , conn , c .key )
86
86
if err != nil {
87
+ if errors .Is (err , config .ErrUnsetConfigPath ) {
88
+ return confKV {c .key , "" }, nil // unset config path
89
+ }
87
90
return nil , errors .Wrap (err , "unable to get config key" )
88
91
}
89
92
return confKV {c .key , fmt .Sprint (k )}, nil
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
15
15
"go.mongodb.org/mongo-driver/bson/primitive"
16
16
"go.mongodb.org/mongo-driver/mongo"
17
17
"go.mongodb.org/mongo-driver/mongo/options"
18
+ "go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
18
19
"gopkg.in/yaml.v2"
19
20
20
21
"github.com/percona/percona-backup-mongodb/pbm/compress"
32
33
ErrUnkownStorageType = errors .New ("unknown storage type" )
33
34
ErrMissedConfig = errors .New ("missed config" )
34
35
ErrMissedConfigProfile = errors .New ("missed config profile" )
36
+ ErrUnsetConfigPath = bsoncore .ErrElementNotFound
35
37
)
36
38
37
39
type confMap map [string ]reflect.Kind
You can’t perform that action at this time.
0 commit comments