Skip to content

Commit e64f94c

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
fix tests and install clippy with rustup
1 parent b4bc177 commit e64f94c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ if ($null -ne $packageType) {
243243
} else {
244244
if ($architecture -ne 'current') {
245245
write-verbose -verbose "Installing clippy for $architecture"
246-
& $rustup component add clippy --target $architecture
246+
rustup component add clippy --target $architecture
247247
} else {
248248
write-verbose -verbose "Installing clippy for current architecture"
249-
& $rustup component add clippy
249+
rustup component add clippy
250250
}
251251
}
252252
if ($LASTEXITCODE -ne 0) {

dsc/tests/dsc_extension_discover.tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ Describe 'Discover extension tests' {
133133
try {
134134
# exclude finding powershell.exe
135135
$oldPath = $env:PATH
136-
$env:PATH = $env:PATH="$env:PROGRAMFILES\PowerShell\7"
136+
$env:PATH = "$env:PROGRAMFILES\PowerShell\7"
137137
$out = dsc resource list 2> $TestDrive/error.log | ConvertFrom-Json
138138
$LASTEXITCODE | Should -Be 0
139139
$out.Count | Should -BeGreaterThan 0
140-
(Get-Content -Path "$TestDrive/error.log" -Raw) | Should -BeLike "WARN Extension 'Microsoft.Windows.Appx/Discover' failed to discover resources: Command: Operation program not found for executable 'powershell'" -Because (Get-Content -Path "$TestDrive/error.log" -Raw | Out-String)
140+
(Get-Content -Path "$TestDrive/error.log" -Raw) | Should -BeLike "*WARN Extension 'Microsoft.Windows.Appx/Discover' failed to discover resources: Command: Operation program not found for executable 'powershell'*" -Because (Get-Content -Path "$TestDrive/error.log" -Raw | Out-String)
141141
} finally {
142142
$env:PATH = $oldPath
143143
}

dsc_lib/src/discovery/command_discovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ impl ResourceDiscovery for CommandDiscovery {
313313
let discovered_resources = match extension.discover() {
314314
Ok(res) => res,
315315
Err(e) => {
316-
warn!("{}", t!("discovery.commandDiscovery.extensionDiscoverFailed", extension = extension.type_name, error = e).to_string());
316+
warn!("{}", t!("discovery.commandDiscovery.extensionDiscoverFailed", extension = extension.type_name, error = e));
317317
continue;
318318
}
319319
};

0 commit comments

Comments
 (0)