Skip to content

Commit d3090c2

Browse files
authored
Fix broken -Quiet parameter for Save-PSResource (#1745)
1 parent 5f7c455 commit d3090c2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/code/SavePSResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ public string TemporaryPath
161161

162162
/// <summary>
163163
/// Check validation for signed and catalog files
164-
165164
/// </summary>
166165
[Parameter]
167166
public SwitchParameter AuthenticodeCheck { get; set; }
168167

169168
/// <summary>
170169
/// Suppresses progress information.
171170
/// </summary>
171+
[Parameter]
172172
public SwitchParameter Quiet { get; set; }
173173

174174
/// <summary>

test/SavePSResourceTests/SavePSResourceLocalTests.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,10 @@ Describe 'Test Save-PSResource for local repositories' -tags 'CI' {
198198
$err.Count | Should -Not -BeNullOrEmpty
199199
$err[0].FullyQualifiedErrorId | Should -BeExactly "InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.SavePSResource"
200200
}
201+
202+
It "Save module using -Quiet" {
203+
$res = Save-PSResource -Name $moduleName -Version "1.0.0" -Repository $localRepo -Path $SaveDir -PassThru -TrustRepository -Quiet
204+
$res.Name | Should -Be $moduleName
205+
$res.Version | Should -Be "1.0.0"
206+
}
201207
}

0 commit comments

Comments
 (0)