Skip to content

Commit 47f9457

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
address copilot feedback
1 parent 5fa4348 commit 47f9457

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

dsc/tests/dsc_extension_discover.tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ Describe 'Discover extension tests' {
164164
'@
165165
$resourceScript = @'
166166
$resource = @{
167-
manifestPath = "$env:TestDrive" + [System.IO.Path]::DirectorySeparatorChar + 'invalidManifest.dsc.json'
167+
manifestPath = "$env:TestDrive" + [System.IO.Path]::DirectorySeparatorChar + 'invalidManifest.dsc.resource.json'
168168
}
169169
$resource | ConvertTo-Json -Compress
170170
'@
171-
$extendionManifest = @'
171+
$extensionManifest = @'
172172
{
173173
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
174174
"type": "Test/DiscoverInvalid",
@@ -187,9 +187,9 @@ Describe 'Discover extension tests' {
187187
}
188188
'@
189189

190-
Set-Content -Path "$TestDrive/invalidManifest.dsc.json" -Value $invalidManifest
190+
Set-Content -Path "$TestDrive/invalidManifest.dsc.resource.json" -Value $invalidManifest
191191
Set-Content -Path "$TestDrive/discover.ps1" -Value $resourceScript
192-
Set-Content -Path "$TestDrive/extension.dsc.extension.json" -Value $extendionManifest
192+
Set-Content -Path "$TestDrive/extension.dsc.extension.json" -Value $extensionManifest
193193
try {
194194
$env:DSC_RESOURCE_PATH = $TestDrive + [System.IO.Path]::PathSeparator + $env:PATH
195195
$env:TestDrive = $TestDrive
@@ -199,7 +199,7 @@ Describe 'Discover extension tests' {
199199
foreach ($resource in $out) {
200200
$resource.type | Should -Not -Be 'Test/InvalidManifest'
201201
}
202-
(Get-Content -Path "$TestDrive/error.log" -Raw) | Should -BeLike "*Failed to load manifest '*invalidManifest.dsc.json':*" -Because (Get-Content -Path "$TestDrive/error.log" -Raw | Out-String)
202+
(Get-Content -Path "$TestDrive/error.log" -Raw) | Should -BeLike "*Extension 'Test/DiscoverInvalid' failed to load manifest '*invalidManifest.dsc.resource.json':*" -Because (Get-Content -Path "$TestDrive/error.log" -Raw | Out-String)
203203
} finally {
204204
$env:DSC_RESOURCE_PATH = $null
205205
$env:TestDrive = $null

lib/dsc-lib/locales/en-us.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ importNoResults = "Extension '%{extension}' returned no results for import"
253253
secretMultipleLinesReturned = "Extension '%{extension}' returned multiple lines which is not supported for secrets"
254254
importProcessingOutput = "Processing output from extension '%{extension}'"
255255
deprecationMessage = "Extension '%{extension}' is deprecated: %{message}"
256-
failedLoadManifest = "Failed to load manifest '%{path}': %{err}"
256+
failedLoadManifest = "Extension '%{extension}' failed to load manifest '%{path}': %{err}"
257257

258258
[extensions.extension_manifest]
259259
extensionManifestSchemaTitle = "Extension manifest schema URI"

lib/dsc-lib/src/discovery/command_discovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl ResourceDiscovery for CommandDiscovery {
278278
// resource that is requested by resource/config operation
279279
// if it is, then "ResouceNotFound" error will be issued later
280280
// and here we just write as info
281-
info!("{}", t!("discovery.commandDiscovery.failedLoadManifest", path = path.to_string_lossy(), err = e).to_string());
281+
info!("{}", t!("discovery.commandDiscovery.failedLoadManifest", path = path.to_string_lossy(), err = e));
282282
continue;
283283
},
284284
};

lib/dsc-lib/src/extensions/discover.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl DscExtension {
102102
let manifests = match load_manifest(&discover_result.manifest_path) {
103103
Ok(manifests) => manifests,
104104
Err(err) => {
105-
info!("{}", t!("extensions.dscextension.failedLoadManifest", path = discover_result.manifest_path.to_string_lossy(), err = err).to_string());
105+
info!("{}", t!("extensions.dscextension.failedLoadManifest", extension = self.type_name, path = discover_result.manifest_path.to_string_lossy(), err = err));
106106
continue;
107107
}
108108
};

0 commit comments

Comments
 (0)