PowerShell / PowerShell/PSResourceGet
Update-PSResource -Confirm confirms too many actions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Update-PSResource cmdlet entry point and reproduce the -Confirm behavior described for Az.* resources on the reported PowerShell and PSResourceGet versions. Trace how dependent updates and the "Exit ShouldProcess" target reach confirmation; done means each intended package action is confirmed once without extra prompts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100