Skip to content

Commit 83fa232

Browse files
dikhakhaTingluoHuang
authored andcommitted
using Get-VstsTaskVariable to override parameters (#8004)
1 parent 785c0ce commit 83fa232

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Tasks/ServiceFabricDeployV1/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 1,
1919
"Minor": 7,
20-
"Patch": 20
20+
"Patch": 21
2121
},
2222
"demands": [
2323
"Cmd"

Tasks/ServiceFabricDeployV1/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 1,
1919
"Minor": 7,
20-
"Patch": 20
20+
"Patch": 21
2121
},
2222
"demands": [
2323
"Cmd"

Tasks/ServiceFabricDeployV1/utilities.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ function Get-OverridenApplicationParameters
121121
$applicationManifestXml = [Xml] (Get-Content -LiteralPath $ApplicationManifestPath)
122122
foreach ($param in $applicationManifestXml.ApplicationManifest.Parameters.Parameter)
123123
{
124-
$paramName = $param.Name -replace "\.", '_' -replace " ", '_'
125-
$paramValue = (Get-Item env:$paramName -ErrorAction Ignore).Value
124+
$paramName = $param.Name
125+
$paramValue = Get-VstsTaskVariable -Name $paramName -ErrorAction Ignore
126126
if ($paramValue)
127127
{
128128
$overrideParameters.Add($paramName, $paramValue)

0 commit comments

Comments
 (0)