Skip to content

Commit

Permalink
Merge pull request #614 from Azure/origin/rupareddy/LoginCC
Browse files Browse the repository at this point in the history
fix(login): fixed short-form of --clear-credentials flag
  • Loading branch information
rupareddy5-21 authored Dec 6, 2022
2 parents 08ac26c + ac6909a commit 97e9461
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/www/docs/cli/swa-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Here are the options you can use with `swa deploy`:
- `-C, --client-id <clientId>`: Azure client ID
- `-CS, --client-secret <clientSecret>`: Azure client secret
- `-n, --app-name <appName>`: Azure Static Web App application name
- `-cc, --clear-credentials`: clear persisted credentials before login (default: `false`)
- `-CC, --clear-credentials`: clear persisted credentials before login (default: `false`)
- `-u, --use-keychain`: enable using the operating system native keychain for persistent credentials (default: `true`)
- `-nu, --no-use-keychain`: disable using the operating system native keychain
- `-h, --help`: display help for command
Expand Down
2 changes: 1 addition & 1 deletion docs/www/docs/cli/swa-login.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Here are the options you can use with `swa login`:
- `-C, --client-id <clientId>`: Azure client ID
- `-CS, --client-secret <clientSecret>`: Azure client secret
- `-n, --app-name <appName>`: Azure Static Web App application name
- `-cc, --clear-credentials`: clear persisted credentials before login (default: `false`)
- `-CC, --clear-credentials`: clear persisted credentials before login (default: `false`)
- `-u, --use-keychain`: enable using the operating system native keychain for persistent credentials (default: `true`)
- `-u, --no-use-keychain`: disable using the operating system native keychain
- `-h, --help`: display help for command
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function addSharedLoginOptionsToCommand(command: Command) {
.option("-C, --client-id <clientId>", "Azure client ID", DEFAULT_CONFIG.clientId)
.option("-CS, --client-secret <clientSecret>", "Azure client secret", DEFAULT_CONFIG.clientSecret)
.option("-n, --app-name <appName>", "Azure Static Web App application name", DEFAULT_CONFIG.appName)
.option("-cc, --clear-credentials", "clear persisted credentials before login", DEFAULT_CONFIG.clearCredentials)
.option("-CC, --clear-credentials", "clear persisted credentials before login", DEFAULT_CONFIG.clearCredentials)

.option("-u, --use-keychain", "enable using the operating system native keychain for persistent credentials", DEFAULT_CONFIG.useKeychain)
// Note: Commander does not automatically recognize the --no-* option, so we have to explicitly use --no-use-keychain- instead
Expand Down
4 changes: 2 additions & 2 deletions src/core/utils/options.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ describe("Testing aliases for each of the commands and their options", () => {
.option("-C, --client-id [clientId]")
.option("-CS, --client-secret [clientSecret]")
.option("-n, --app-name [appName]")
.option("-cc, --clear-credentials")
.option("-CC, --clear-credentials")
.option("-u, --use-keychain")
.option("-nu, --no-use-keychain")
.parseAsync([
Expand All @@ -249,7 +249,7 @@ describe("Testing aliases for each of the commands and their options", () => {
"clientSecret",
"-n",
"appName",
"-cc",
"-CC",
"-nu",
]);

Expand Down

0 comments on commit 97e9461

Please sign in to comment.