Skip to content

Commit 80aacac

Browse files
Update index.js
1 parent 64608b1 commit 80aacac

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

azurecontainerapps.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export class azurecontainerapps {
181181

182182
this.toolHelper.writeDebug("Setting default value for activeRevisionsMode: 'Labels'");
183183
this.activeRevisionsMode = 'Labels'; // Default value for active revisions mode
184-
184+
185185
if (!this.util.isNullOrEmpty(this.activeRevisionsMode)) {
186186
this.toolHelper.writeDebug("activeRevisionsMode is not null or empty, attempting to get input...");
187187

@@ -198,14 +198,13 @@ export class azurecontainerapps {
198198
if (this.activeRevisionsMode === 'Labels') {
199199
this.toolHelper.writeDebug("activeRevisionsMode is 'Labels'. Checking for targetLabel...");
200200

201+
this.targetLabel = this.toolHelper.getInput('targetLabel', false);
202+
this.toolHelper.writeDebug(`Retrieved targetLabel input: ${this.targetLabel}`);
201203
if (this.util.isNullOrEmpty(this.targetLabel)) {
202204
const missingTargetLabelMessage = `The 'targetLabel' argument must be provided when 'activeRevisionsMode' is set to 'Labels'.`;
203205
this.toolHelper.writeError(missingTargetLabelMessage);
204206
throw Error(missingTargetLabelMessage);
205207
}
206-
207-
this.targetLabel = this.toolHelper.getInput('targetLabel', false);
208-
this.toolHelper.writeDebug(`Retrieved targetLabel input: ${this.targetLabel}`);
209208
}
210209
}
211210

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,13 @@ var azurecontainerapps = /** @class */ (function () {
198198
}
199199
if (this.activeRevisionsMode === 'Labels') {
200200
this.toolHelper.writeDebug("activeRevisionsMode is 'Labels'. Checking for targetLabel...");
201+
this.targetLabel = this.toolHelper.getInput('targetLabel', false);
202+
this.toolHelper.writeDebug("Retrieved targetLabel input: ".concat(this.targetLabel));
201203
if (this.util.isNullOrEmpty(this.targetLabel)) {
202204
var missingTargetLabelMessage = "The 'targetLabel' argument must be provided when 'activeRevisionsMode' is set to 'Labels'.";
203205
this.toolHelper.writeError(missingTargetLabelMessage);
204206
throw Error(missingTargetLabelMessage);
205207
}
206-
this.targetLabel = this.toolHelper.getInput('targetLabel', false);
207-
this.toolHelper.writeDebug("Retrieved targetLabel input: ".concat(this.targetLabel));
208208
}
209209
}
210210
// Set up the build arguments to pass to the Dockerfile or builder

0 commit comments

Comments
 (0)