From f2f62940c62b2c9d06481bfc5ea987bfff57d673 Mon Sep 17 00:00:00 2001 From: Balaga Gayatri Date: Mon, 6 Sep 2021 15:22:14 +0530 Subject: [PATCH] login commented --- lib/PowerShell/ServicePrincipalLogin.js | 8 ++++---- src/PowerShell/ServicePrincipalLogin.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/PowerShell/ServicePrincipalLogin.js b/lib/PowerShell/ServicePrincipalLogin.js index 999e21d4..e2a67616 100644 --- a/lib/PowerShell/ServicePrincipalLogin.js +++ b/lib/PowerShell/ServicePrincipalLogin.js @@ -77,10 +77,10 @@ class ServicePrincipalLogin { const script = new ScriptBuilder_1.default().getAzPSLoginScript(ServicePrincipalLogin.scheme, this.tenantId, args); yield PowerShellToolRunner_1.default.init(); // await PowerShellToolRunner.executePowerShellScriptBlock(script, options); - 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]}`); - } + // const result: any = JSON.parse(output.trim()); + // if (!(Constants.Success in result)) { + // throw new Error(`Azure PowerShell login failed with error: ${result[Constants.Error]}`); + // } console.log(`Azure PowerShell session successfully initialized`); }); } diff --git a/src/PowerShell/ServicePrincipalLogin.ts b/src/PowerShell/ServicePrincipalLogin.ts index 2cd13f3b..88b479c7 100644 --- a/src/PowerShell/ServicePrincipalLogin.ts +++ b/src/PowerShell/ServicePrincipalLogin.ts @@ -61,10 +61,10 @@ export class ServicePrincipalLogin implements IAzurePowerShellSession { const script: string = new ScriptBuilder().getAzPSLoginScript(ServicePrincipalLogin.scheme, this.tenantId, args); await PowerShellToolRunner.init(); // await PowerShellToolRunner.executePowerShellScriptBlock(script, options); - const result: any = JSON.parse(output.trim()); - if (!(Constants.Success in result)) { - throw new Error(`Azure PowerShell login failed with error: ${result[Constants.Error]}`); - } + // const result: any = JSON.parse(output.trim()); + // if (!(Constants.Success in result)) { + // throw new Error(`Azure PowerShell login failed with error: ${result[Constants.Error]}`); + // } console.log(`Azure PowerShell session successfully initialized`); }