Skip to content

Find-PSResource has SupportsShouldProcess but shouldn't #694

@ThomasNieto

Description

@ThomasNieto

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

Find-PSResource has SupportsShouldProcess defined but shouldn't since it does not change system state.

https://github.com/PowerShell/PowerShellGet/blob/b8599db8cd402b09e9a0bd11bdd48fcb94771a7b/src/code/FindPSResource.cs#L24

Expected behavior

SupportsShouldProcess not defined.

Actual behavior

SupportsShouldProcess is defined and adds WhatIf and Confirm parameters.

Error details

N/A

Environment data

Name          Version
----          -------
PowerShellGet 3.0.14

Name                           Value
----                           -----
PSVersion                      7.2.5
PSEdition                      Core
GitCommitId                    7.2.5
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions