Skip to content

Commit

Permalink
trim the outputNames
Browse files Browse the repository at this point in the history
  • Loading branch information
keesschollaart81 committed Dec 28, 2018
1 parent c00f2f8 commit 277a25d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arm-outputs/arm-outputsV2/arm-outputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class ArmOutputs {
var results: ArmOutputResult[] = [];
for (var output in outputs) {

if (this.config.outputNames.length > 0 && !this.config.outputNames.some(x => x == output)) {
if (this.config.outputNames.length > 0 && !this.config.outputNames.some(x => x.trim() == output)) {
console.info(`Variable '${output}' is not one of the ${this.config.outputNames.length} given key's to set, ignoring...`);
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions arm-outputs/arm-outputsV2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class AzureDevOpsArmOutputsTaskHost {
const debugModeString: string = tl.getVariable('System.Debug');
const debugMode: boolean = debugModeString ? debugModeString.toLowerCase() != 'false' : false;
if (debugMode) {
tl.warning("You are running in debug mode (variable System.Debug is set to true), ARM Outputs will print the values of your ARM Outputs to the log. If your deployment outputs any secret values, they will be shown, be careful (especially with public projects)!");
tl.warning("You are running in debug mode (variable System.Debug is set to true), the values of your ARM Outputs will be printed to the log. If your deployment outputs any secret values, they will be shown, be careful (especially with public projects)!");
}

var params = <ArmOutputParams>{
Expand All @@ -45,7 +45,7 @@ export class AzureDevOpsArmOutputsTaskHost {

var armOutputs = new ArmOutputs(params);
var outputs = await armOutputs.run();
outputs.forEach(output => {
outputs.forEach(output => {
console.info(`Updating Azure Pipelines variable '${output.key}'`);
tl.setVariable(output.key, output.value, false);
});
Expand Down
2 changes: 1 addition & 1 deletion arm-outputs/arm-outputsV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 5,
"Minor": 0,
"Patch": 16
"Patch": 17
},
"releaseNotes": "Complete rewrite from PowerShell to Node to enable Linux based agents",
"demands": [],
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "arm-outputs",
"name": "ARM Outputs",
"version": "5.0.21",
"version": "5.0.22",
"publisher": "keesschollaart",
"public": true,
"helpMarkDown": "[More Information](https://github.com/keesschollaart81/vsts-arm-outputs)",
Expand Down

0 comments on commit 277a25d

Please sign in to comment.