Skip to content

Commit ce44a79

Browse files
committed
try again
1 parent 2aa2e45 commit ce44a79

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

src/PowerShell/Microsoft.WinGet.Configuration.Engine/Commands/ConfigurationCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ private async Task InstallDSCv3Package(OpenConfigurationParameters openParams)
424424
this.Write(StreamType.Information, Resources.ConfigurationInstallDscPackage);
425425

426426
InitialSessionState initialSessionState = InitialSessionState.CreateDefault();
427-
initialSessionState.ExecutionPolicy = openParams.ExecutionPolicy;
427+
428+
// initialSessionState.ExecutionPolicy = openParams.ExecutionPolicy;
428429
Runspace runspace = RunspaceFactory.CreateRunspace(initialSessionState);
429430
runspace.Open();
430431
PowerShell installDSCv3 = PowerShell.Create(runspace).AddScript(
@@ -437,7 +438,7 @@ private async Task InstallDSCv3Package(OpenConfigurationParameters openParams)
437438
$installResult = Install-WingetPackage -Id {DSCv3PackageId} -Source msstore
438439
if ($installResult.Status -ne 'Ok')
439440
{{
440-
Write-Error ""Failed to install DSCv3 package. Status: $($installResult.Status). ExtendedErrorCode $($installResult.ExtendedErrorCode)"" -ErrorAction Stop
441+
Write-Error ""Failed to install DSCv3 package. Status: $($installResult.Status). ExtendedErrorCode: $($installResult.ExtendedErrorCode)."" -ErrorAction Stop
441442
}}
442443
");
443444

src/PowerShell/tests/Microsoft.WinGet.Configuration.Tests.ps1

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ BeforeAll {
2525
# The msstore source will be used to install DSCv3 package
2626
Import-Module Microsoft.WinGet.Client
2727

28-
$installResult = Install-WingetPackage -Id 9PCX3HX4HZ0Z -Source msstore
29-
if ($installResult.Status -ne 'Ok')
30-
{
31-
Write-Error "Failed to install DSCv3 package. Status: $($installResult.Status). ExtendedErrorCode $($installResult.ExtendedErrorCode)" -ErrorAction Stop
32-
}
33-
3428
function CreatePolicyKeyIfNotExists()
3529
{
3630
$registryExists = test-path -Path $wingetGroupPolicyRegistryRoot
@@ -487,7 +481,7 @@ Describe 'Invoke-WinGetConfiguration' {
487481

488482
$expectedFile = Join-Path $(GetConfigTestDataPath) "ShowDetails_DSCv3.txt"
489483
Test-Path $expectedFile | Should -Be $true
490-
Get-Content $expectedFile -Raw | Should -Be "Contents!"
484+
Get-Content $expectedFile -Raw | Should -Be "DSCv3 Contents!"
491485
}
492486

493487
It 'Piped' {
@@ -697,7 +691,7 @@ Describe 'Start|Complete-WinGetConfiguration' {
697691

698692
$expectedFile = Join-Path $(GetConfigTestDataPath) "ShowDetails_DSCv3.txt"
699693
Test-Path $expectedFile | Should -Be $true
700-
Get-Content $expectedFile -Raw | Should -Be "Contents!"
694+
Get-Content $expectedFile -Raw | Should -Be "DSCv3 Contents!"
701695

702696
# Verify can't be used after.
703697
{ Start-WinGetConfiguration -AcceptConfigurationAgreements -Set $set } | Should -Throw "Operation is not valid due to the current state of the object."
@@ -862,7 +856,7 @@ Describe 'Test-WinGetConfiguration' {
862856
$set | Should -Not -BeNullOrEmpty
863857

864858
$expectedFile = Join-Path $(GetConfigTestDataPath) "ShowDetails_DSCv3.txt"
865-
Set-Content -Path $expectedFile -Value "Contents!" -NoNewline
859+
Set-Content -Path $expectedFile -Value "DSCv3 Contents!" -NoNewline
866860

867861
$result = Test-WinGetConfiguration -AcceptConfigurationAgreements -Set $set
868862
$result | Should -Not -BeNullOrEmpty

0 commit comments

Comments
 (0)