PowerShell / PowerShell/PSScriptAnalyzer
AzureRM.* modules held in use by PSSA when Cluster 0.0.0.1 is scanned, prevents uninstall
未关闭
还没有人认领这个 Issue。
Area - Engine
Issue - Enhancement
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
Repro steps
Install-Module -Name Cluster -RequiredVersion 0.0.0.1 -Repository PSGallery
# This depends on AzureRM, which in turn depends on 45 AzureRM.* modules.
# All get downloaded at install.
Invoke-ScriptAnalyzer -Path [PathToCluster] -Recurse -Severity Error
Invoke-ScriptAnalyzer -Path [PathToCluster] -Recurse -CustomerRulePath [someCustomRulesPath]
Uninstall-Module -Name Cluster -RequiredVersion 0.0.0.1
# Succeeds
Uninstall-Module -Name AzureRM.Websites
# One of the dependencies installed.
# Fails to uninstall, says is currently in use.
Expected Behavior
I should be able to uninstall the AzureRM.* modules. I don't expect PSSA to hold on to them.
We are unable to uninstall any of the AzureRM.* modules because something in PSSA is holding on to them. This appears to only happen for the Cluster 0.0.0.1 module.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 Cluster 0.0.0.1 重现列出的 Install-Module、Invoke-ScriptAnalyzer 和 Uninstall-Module 命令,对比有无 CustomerRulePath 时的扫描结果。跟踪 PSScriptAnalyzer 在这些扫描期间如何加载模块,并验证之后可以卸载 AzureRM.* 模块;当报告的锁定不再发生时即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, powershell
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100