Skip to content

Commit

Permalink
Run az account clear instead of az logout at the beginning (#377)
Browse files Browse the repository at this point in the history
* az account clear

* remove catch error
  • Loading branch information
MoChilia authored Dec 1, 2023
1 parent 7c3c862 commit 1b07ea9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Cli/AzureCliLogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ export class AzureCliLogin {
await this.executeAzCliCommand(["--version"], true, execOptions);
core.debug(`Azure CLI version used:\n${output}`);

try {
await this.executeAzCliCommand(["logout"], true, execOptions);
}
catch (error) {
core.debug(`Ignore logout error: "${error}"`);
}
await this.executeAzCliCommand(["account", "clear"], true, execOptions);

this.setAzurestackEnvIfNecessary();

Expand Down

0 comments on commit 1b07ea9

Please sign in to comment.