Skip to content

Commit b60b11f

Browse files
1gtmEmruz Hossainhmsayem
authored
[cherry-pick] Update flags: --username, --password to --username=, --password= (#1435)
* Update flags: `--username`, `--password` to `--username=`, `--password=` /cherry-pick Signed-off-by: Emruz Hossain <emruz@appscode.com> * Fix cherrypick Signed-off-by: hmsayem <hmsayem@appscode.com> Co-authored-by: Emruz Hossain <emruz@appscode.com> Co-authored-by: hmsayem <hmsayem@appscode.com>
1 parent fe2ff6d commit b60b11f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/backup.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ func (opt *mongoOptions) backupMongoDB(targetRef api_v1beta1.TargetRef) (*restic
357357

358358
} else {
359359
userAuth := []interface{}{
360-
"--username", string(appBindingSecret.Data[MongoUserKey]),
361-
"--password", string(appBindingSecret.Data[MongoPasswordKey]),
360+
fmt.Sprintf("--username=%s", appBindingSecret.Data[MongoUserKey]),
361+
fmt.Sprintf("--password=%s", appBindingSecret.Data[MongoPasswordKey]),
362362
"--authenticationDatabase", opt.authenticationDatabase,
363363
}
364364
mongoCreds = append(mongoCreds, userAuth...)

pkg/restore.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ func (opt *mongoOptions) restoreMongoDB(targetRef api_v1beta1.TargetRef) (*resti
288288

289289
} else {
290290
userAuth := []interface{}{
291-
"--username", string(appBindingSecret.Data[MongoUserKey]),
292-
"--password", string(appBindingSecret.Data[MongoPasswordKey]),
291+
fmt.Sprintf("--username=%s", appBindingSecret.Data[MongoUserKey]),
292+
fmt.Sprintf("--password=%s", appBindingSecret.Data[MongoPasswordKey]),
293293
"--authenticationDatabase", opt.authenticationDatabase,
294294
}
295295
mongoCreds = append(mongoCreds, userAuth...)

0 commit comments

Comments
 (0)