(dsc): Add `_purge` to `PSResourceList` resource
还没有人认领这个 Issue。
评估
调研方向
Start with the PSResourceList schema, the DSC purge.json property schema, and GetPSResourceListActions. Trace how test, set, and what-if consume those actions, then verify that unmatched installed resources are reported or uninstalled according to _purge and the selected scope.
由索引模型根据 Issue 内容生成。
描述
Summary of the new feature / enhancement
As a user, I want _purge: true on a PSResourceList instance so that any resource installed from that repository and not present in resources is uninstalled during set, and reported as a difference during test.
resources:
- name: Only these modules
type: Microsoft.PowerShell.PSResourceGet/PSResourceList
properties:
repositoryName: PSGallery
_purge: true
resources:
- name: Pester
- name: PSScriptAnalyzer
With Pester, PSScriptAnalyzer and Az.Accounts installed from PSGallery, test reports _inDesiredState: false and set uninstalls Az.Accounts.
Proposed technical implementation details (optional)
- Add
_purgeto thePSResourceListschema, referencing the DSCpurge.jsonproperty schema. - In
GetPSResourceListActions, when_purgeis set, append anUninstallaction for every installed resource from the repository that has no matching desired entry.test,setand what-if pick this up automatically since they share that function. - Respect
scope: only purge from the scopes the listed resources use, or from both when none is specified, and document which one was chosen.
- 主要语言
- C#
- 星标
- 576
- 派生
- 114
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 7
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PowerShell/PSResourceGet 的其他 Issue
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
PowerShell/PSResourceGet#2056 ·
-
feature_request
难度 2/5 1-3 小时 新手友好度 68/100
PowerShell/PSResourceGet#2013 · 3 条评论 ·
-
Needs-Triage
难度 3/5 1-2 天 新手友好度 68/100
PowerShell/PSResourceGet#2055 ·
-
Needs-Triage
难度 3/5 1-2 天 新手友好度 72/100
PowerShell/PSResourceGet#2054 ·
-
(dsc): Export ignores `--input` filter for `Repository` and `PSResourceList` on DSC 3.3.* or above 未关闭Needs-Triage
难度 3/5 1-2 天 新手友好度 72/100
PowerShell/PSResourceGet#2053 ·
查看 PowerShell/PSResourceGet 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
难度 2/5 1-3 小时 新手友好度 72/100
azurenoops/spin_agent#975 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
难度 2/5 1-3 小时 新手友好度 92/100
dotnet/AspNetCore.Docs#37699 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
SubtitleEdit/subtitleedit#15108 · 1 条评论 ·