Skip to content

Update-PSResource -Confirm confirms too many actions #1444

Open
@peetrike

Description

@peetrike

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

when using Update-PSResource with -Confirm parameter, the cmdlet confirms also dependent module updates, even if these were updated just with previous item. It also asks for confirmation for "Exit ShouldProcess".

Expected behavior

PS > Update-PSResource -Name Az.* -Confirm

Confirm
Are you sure you want to perform this action?
Performing the operation "Update-PSResource" on target "Package to install: 'Az.Accounts', version: '2.13.1'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

Confirm
Are you sure you want to perform this action?
Performing the operation "Update-PSResource" on target "Package to install: 'Az.Resources', version: '6.11.1'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

Actual behavior

PS > Update-PSResource -Name Az.* -Confirm

Confirm
Are you sure you want to perform this action?
Performing the operation "Update-PSResource" on target "Package to install: 'Az.Accounts', version: '2.13.1'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

Confirm
Are you sure you want to perform this action?
Performing the operation "Update-PSResource" on target "Exit ShouldProcess".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

Confirm
Are you sure you want to perform this action?
Performing the operation "Update-PSResource" on target "Package to install: 'Az.Resources', version: '6.11.1'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

Confirm
Are you sure you want to perform this action?
Performing the operation "Update-PSResource" on target "Package to install: 'Az.Accounts', version: '2.13.1'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

Confirm
Are you sure you want to perform this action?
Performing the operation "Update-PSResource" on target "Exit ShouldProcess".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

Error details

No response

Environment data

PSResourceGet v1.0.0
PowerShell v7.3.8 / 5.1

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions