Skip to content

Commit f918bfb

Browse files
committed
address feedback
1 parent 6678bd1 commit f918bfb

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

dsc/tests/dsc_discovery.tests.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,17 @@ Describe 'tests for resource discovery' {
316316
}
317317
'@
318318
Set-Content -Path "$testdrive/test.dsc.resource.json" -Value $invalidManifest
319+
$oldPath = $env:DSC_RESOURCE_PATH
319320
try {
320321
$env:DSC_RESOURCE_PATH = $testdrive + [System.IO.Path]::PathSeparator + $env:PATH
321322

322323
$out = dsc -l info resource list 'Test/InvalidManifest' 2> "$testdrive/error.txt" | ConvertFrom-Json
323324
$LASTEXITCODE | Should -Be 0
324325
$out | Should -BeNullOrEmpty -Because (Get-Content -Raw -Path "$testdrive/error.txt")
325326
$errorLog = Get-Content -Raw -Path "$testdrive/error.txt"
326-
$errorLog | Should -Match "INFO Failed to load manifest: Manifest: Invalid manifest for resource '.*test.dsc.resource.json'" -Because $errorLog
327+
$errorLog | Should -BeLike "*INFO Failed to load manifest: Manifest: Invalid manifest for resource '*test.dsc.resource.json'*" -Because $errorLog
327328
} finally {
328-
$env:DSC_RESOURCE_PATH = $null
329+
$env:DSC_RESOURCE_PATH = $oldPath
329330
}
330331
}
331332
}

dsc_lib/src/discovery/command_discovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ impl ResourceDiscovery for CommandDiscovery {
249249
// resource that is requested by resource/config operation
250250
// if it is, then "ResourceNotFound" error will be issued later
251251
// and here we just write as information
252-
info!("{}", t!("discovery.commandDiscovery.failedLoadManifest", err = e).to_string());
252+
info!("{}", t!("discovery.commandDiscovery.failedLoadManifest", err = e));
253253
continue;
254254
},
255255
};

0 commit comments

Comments
 (0)