PowerShell/PowerShellGet

Reverse logic for AllowClobber and SkipPublisherCheck in proxy cmdlets

sdwheeler opened this issue · 0 comments

Summary of the new feature / enhancement

Install-Module has the AllowClobber parameter, but the proxy cmdlet discards the parameter. Install-PSResource has the NoClobber parameter.

The Install-Module default behavior prevents clobber and runs Authenticode check.
The Install-PSResource default behavior allows clobber and skips Authenticode check.

The two cmdlets have opposite logic for handling these parameters.

Proposed technical implementation details (optional)

$PSBoundParameters['NoClobber'] = $true
if ( $PSBoundParameters['AllowClobber'] )    { $null = $PSBoundParameters.Remove('AllowClobber'); $PSBoundParameters['NoClobber'] = (-not $AllowClobber) }

$PSBoundParameters['AuthenticodeCheck'] = $true
if ( $PSBoundParameters['SkipPublisherCheck'] ) { $null = $PSBoundParameters.Remove('SkipPublisherCheck'); $PSBoundParameters['AuthenticodeCheck'] = (-not $SkipPublisherCheck) }