Run az account clear instead of az logout at the beginning (#377)

* az account clear

* remove catch error
This commit is contained in:
Shiying Chen
2023-12-01 10:07:30 +08:00
committed by GitHub
parent 7c3c862a28
commit 1b07ea9bb5

View File

@@ -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();