Skip to content

Commit 7190ea7

Browse files
authored
fix: az devops takes heading space as part of value (#429)
* fix: az devops takes heading space as part of value * pr-fix: updated wrong test assertion
1 parent c75ae2b commit 7190ea7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/Arcus.Scripting.DevOps/Arcus.Scripting.DevOps.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ function Set-AzDevOpsVariable {
1919
)
2020

2121
if ($AsSecret) {
22-
Write-Host "##vso[task.setvariable variable=$Name;issecret=true] $Value"
22+
Write-Host "##vso[task.setvariable variable=$Name;issecret=true]$Value"
2323
} else {
24-
Write-Host "##vso[task.setvariable variable=$Name] $Value"
24+
Write-Host "##vso[task.setvariable variable=$Name]$Value"
2525
}
2626
}
2727

@@ -105,4 +105,4 @@ function Save-AzDevOpsBuild {
105105
. $PSScriptRoot\Scripts\Save-AzDevOpsBuild.ps1 -ProjectId $ProjectId -BuildId $BuildId -DaysToKeep $DaysToKeep
106106
}
107107

108-
Export-ModuleMember -Function Save-AzDevOpsBuild
108+
Export-ModuleMember -Function Save-AzDevOpsBuild

src/Arcus.Scripting.Tests.Unit/Arcus.Scripting.DevOps.tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ InModuleScope Arcus.Scripting.DevOps {
55
Context "Setting ARM outputs to Azure DevOps variable group" {
66
It "Setting DevOps variable should write to host" {
77
# Arrange
8-
Mock Write-Host { $Object | Should -Be "##vso[task.setvariable variable=test] value" } -Verifiable
8+
Mock Write-Host { $Object | Should -Be "##vso[task.setvariable variable=test]value" } -Verifiable
99

1010
# Act
1111
Set-AzDevOpsVariable "test" "value"
@@ -15,7 +15,7 @@ InModuleScope Arcus.Scripting.DevOps {
1515
}
1616
It "Setting DevOps variable as secret should write to host" {
1717
# Arrange
18-
Mock Write-Host { $Object | Should -Be "##vso[task.setvariable variable=test;issecret=true] value" } -Verifiable
18+
Mock Write-Host { $Object | Should -Be "##vso[task.setvariable variable=test;issecret=true]value" } -Verifiable
1919

2020
# Act
2121
Set-AzDevOpsVariable "test" "value" -AsSecret

0 commit comments

Comments
 (0)