Skip to content

Commit 6f28cb2

Browse files
committed
Fix issue with GetScript output
1 parent 67d9dde commit 6f28cb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

powershell-adapter/Tests/powershellgroup.resource.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Describe 'PowerShell adapter resource tests' {
4040
It 'Get works on traditional "Script" resource' -Skip:(!$IsWindows){
4141

4242
'test' | Set-Content -Path c:\test.txt -Force
43-
$r = '{"GetScript": "Get-Content c:\\test.txt", "SetScript": "throw", "TestScript": "throw"}' | dsc resource get -r 'PSDesiredStateConfiguration/Script'
43+
$r = '{"GetScript": "@{result = $(Get-Content c:\\test.txt)}", "SetScript": "throw", "TestScript": "throw"}' | dsc resource get -r 'PSDesiredStateConfiguration/Script'
4444
$LASTEXITCODE | Should -Be 0
4545
$res = $r | ConvertFrom-Json
4646
$res.actualState.result.properties.GetScript | Should -Be 'c:\test.txt'

0 commit comments

Comments
 (0)