From 4e5e99a6307f1584798362c05b18b3c06e9424c1 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Fri, 26 Apr 2024 13:39:04 +0530 Subject: [PATCH] Fix logic to check if update command is used or not --- azurecontainerapps.ts | 2 +- dist/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azurecontainerapps.ts b/azurecontainerapps.ts index 70dffba..bdc23d6 100644 --- a/azurecontainerapps.ts +++ b/azurecontainerapps.ts @@ -606,7 +606,7 @@ export class azurecontainerapps { } const environmentVariables: string = this.toolHelper.getInput('environmentVariables', false); - const isCappUpdateCommandUsed: boolean = this.noIngressUpdate || (!this.noIngressUpdate && this.adminCredentialsProvided) + const isCappUpdateCommandUsed: boolean = this.containerAppExists && (!this.shouldCreateOrUpdateContainerAppWithUp && (!this.adminCredentialsProvided || this.noIngressUpdate)) // Add user-specified environment variables if (!this.util.isNullOrEmpty(environmentVariables)) { // The --replace-env-vars flag is only used for the 'update' command, diff --git a/dist/index.js b/dist/index.js index 37f9e78..f0b3c56 100644 --- a/dist/index.js +++ b/dist/index.js @@ -690,7 +690,7 @@ var azurecontainerapps = /** @class */ (function () { } } var environmentVariables = this.toolHelper.getInput('environmentVariables', false); - var isCappUpdateCommandUsed = this.noIngressUpdate || (!this.noIngressUpdate && this.adminCredentialsProvided); + var isCappUpdateCommandUsed = this.containerAppExists && (!this.shouldCreateOrUpdateContainerAppWithUp && (!this.adminCredentialsProvided || this.noIngressUpdate)); // Add user-specified environment variables if (!this.util.isNullOrEmpty(environmentVariables)) { // The --replace-env-vars flag is only used for the 'update' command,