From 143c5a7c40a65900cc0492ea94d2de86868540ba Mon Sep 17 00:00:00 2001 From: snehapar9 Date: Sat, 23 Sep 2023 23:17:56 -0700 Subject: [PATCH] Remove commented code --- dist/index.js | 2 +- src/ContainerAppHelper.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 712c1412..be31feb3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4838,7 +4838,6 @@ var ContainerAppHelper = /** @class */ (function () { return [4 /*yield*/, exec.exec("az", command.split(' '))]; case 2: exitCode = _a.sent(); - // const executionResult = await new Utility().executeAndthrowIfError(`az`, command.split(' ')); return [2 /*return*/, exitCode === 0]; case 3: err_6 = _a.sent(); @@ -4926,6 +4925,7 @@ var ContainerAppHelper = /** @class */ (function () { return [4 /*yield*/, new Utility_1.Utility().executeAndthrowIfError("az", args)]; case 2: executionResult = _a.sent(); + // If successful, strip out double quotes, spaces and parentheses from the first location returned return [2 /*return*/, !executionResult.stderr ? executionResult.stdout.toLowerCase().replace(/["() ]/g, "").trim() : "eastus2"]; case 3: err_9 = _a.sent(); diff --git a/src/ContainerAppHelper.ts b/src/ContainerAppHelper.ts index 868128e9..44f2ebb9 100644 --- a/src/ContainerAppHelper.ts +++ b/src/ContainerAppHelper.ts @@ -159,9 +159,8 @@ export class ContainerAppHelper { public async doesContainerAppExist(containerAppName: string, resourceGroup: string): Promise { core.debug(`Attempting to determine if Container App with name "${containerAppName}" exists in resource group "${resourceGroup}"`); try { - const command = `containerapp show -n ${containerAppName} -g ${resourceGroup} -o none`; + let command = `containerapp show -n ${containerAppName} -g ${resourceGroup} -o none`; const exitCode = await exec.exec(`az`, command.split(' ')); - // const executionResult = await new Utility().executeAndthrowIfError(`az`, command.split(' ')); return exitCode === 0; } catch (err) { core.warning(err.message);