From cd77f43fb2d6aff0e355664928b6d96018a4d427 Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 20 Jan 2023 16:01:20 -0500 Subject: [PATCH] CLI: Updates for Exchange Help (#2191) ## Description Removes references to M365 ID as instruction. ## Does this PR need a docs update or release note? - [x] :no_entry: No, self-documenting ## Type of change - [x] :bug: Bugfix ## Issue(s) * closes #2190 ## Test Plan - [x] :zap: Unit test --- src/cli/backup/exchange.go | 8 ++++---- src/cli/backup/onedrive.go | 4 ++-- src/cli/restore/exchange.go | 2 +- src/cli/restore/onedrive.go | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cli/backup/exchange.go b/src/cli/backup/exchange.go index 63a1f6393..ac6455522 100644 --- a/src/cli/backup/exchange.go +++ b/src/cli/backup/exchange.go @@ -61,7 +61,7 @@ const ( const ( exchangeServiceCommand = "exchange" - exchangeServiceCommandCreateUseSuffix = "--user | '" + utils.Wildcard + "'" + exchangeServiceCommandCreateUseSuffix = "--user | '" + utils.Wildcard + "'" exchangeServiceCommandDeleteUseSuffix = "--backup " exchangeServiceCommandDetailsUseSuffix = "--backup " ) @@ -115,7 +115,7 @@ func addExchangeCommands(cmd *cobra.Command) *cobra.Command { fs.StringSliceVar( &user, utils.UserFN, nil, - "Backup Exchange data by user ID; accepts '"+utils.Wildcard+"' to select all users") + "Backup Exchange data by a user's email; accepts '"+utils.Wildcard+"' to select all users") fs.StringSliceVar( &exchangeData, utils.DataFN, nil, @@ -274,7 +274,7 @@ func createExchangeCmd(cmd *cobra.Command, args []string) error { users, err := m365.UserPNs(ctx, acct) if err != nil { - return Only(ctx, errors.Wrap(err, "Failed to retrieve M365 users")) + return Only(ctx, errors.Wrap(err, "Failed to retrieve M365 user(s)")) } var ( @@ -347,7 +347,7 @@ func exchangeBackupCreateSelectors(userIDs, data []string) *selectors.ExchangeBa func validateExchangeBackupCreateFlags(userIDs, data []string) error { if len(userIDs) == 0 { - return errors.New("--user requires one or more ids or the wildcard *") + return errors.New("--user requires one or more email addresses or the wildcard '*'") } for _, d := range data { diff --git a/src/cli/backup/onedrive.go b/src/cli/backup/onedrive.go index 3454a9b3b..60a055dce 100644 --- a/src/cli/backup/onedrive.go +++ b/src/cli/backup/onedrive.go @@ -29,7 +29,7 @@ import ( const ( oneDriveServiceCommand = "onedrive" - oneDriveServiceCommandCreateUseSuffix = "--user | '" + utils.Wildcard + "'" + oneDriveServiceCommandCreateUseSuffix = "--user | '" + utils.Wildcard + "'" oneDriveServiceCommandDeleteUseSuffix = "--backup " oneDriveServiceCommandDetailsUseSuffix = "--backup " ) @@ -85,7 +85,7 @@ func addOneDriveCommands(cmd *cobra.Command) *cobra.Command { fs.StringSliceVar(&user, utils.UserFN, nil, - "Backup OneDrive data by user ID; accepts '"+utils.Wildcard+"' to select all users. (required)") + "Backup OneDrive data by user's email address; accepts '"+utils.Wildcard+"' to select all users. (required)") options.AddOperationFlags(c) case listCommand: diff --git a/src/cli/restore/exchange.go b/src/cli/restore/exchange.go index 6d67fa03e..d0801061f 100644 --- a/src/cli/restore/exchange.go +++ b/src/cli/restore/exchange.go @@ -63,7 +63,7 @@ func addExchangeCommands(cmd *cobra.Command) *cobra.Command { fs.StringSliceVar(&user, utils.UserFN, nil, - "Restore data by user ID; accepts '"+utils.Wildcard+"' to select all users.") + "Restore data by user's email address; accepts '"+utils.Wildcard+"' to select all users.") // email flags fs.StringSliceVar(&email, diff --git a/src/cli/restore/onedrive.go b/src/cli/restore/onedrive.go index 0932461a3..526db414b 100644 --- a/src/cli/restore/onedrive.go +++ b/src/cli/restore/onedrive.go @@ -49,7 +49,7 @@ func addOneDriveCommands(cmd *cobra.Command) *cobra.Command { fs.StringSliceVar(&user, utils.UserFN, nil, - "Restore data by user ID; accepts '"+utils.Wildcard+"' to select all users.") + "Restore data by user's email address; accepts '"+utils.Wildcard+"' to select all users.") // onedrive hierarchy (path/name) flags