mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
added review comments
This commit is contained in:
@@ -59,9 +59,9 @@ class ServicePrincipalLogin {
|
||||
const script = new ScriptBuilder_1.default().getAzPSLoginScript(ServicePrincipalLogin.scheme, this.tenantId, args);
|
||||
yield PowerShellToolRunner_1.default.init();
|
||||
yield PowerShellToolRunner_1.default.executePowerShellScriptBlock(script, options);
|
||||
const outputJson = JSON.parse(output.trim());
|
||||
if (!(Constants_1.default.Success in outputJson)) {
|
||||
throw new Error(`Azure PowerShell login failed with error: ${outputJson[Constants_1.default.Error]}`);
|
||||
const result = JSON.parse(output.trim());
|
||||
if (!(Constants_1.default.Success in result)) {
|
||||
throw new Error(`Azure PowerShell login failed with error: ${result[Constants_1.default.Error]}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user