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