CPMR0035 - Use of Get-BinRoot (script)

CPMR0035 - Use of Get-BinRoot (script)

⚠️ WARNING

This rule has been marked as a Guideline

Guidelines are strong suggestions that improve the quality of a package version. These are considered something to fix for next time to increase the quality of the package. Over time Guidelines can become Requirements. A package version can be approved without addressing Guideline comments but will reduce the quality of the package.

📝 NOTE

This page is a stub that has not yet been filled out. If you have questions about this issue, please ask in the review or reach out on Community Chat

Issue

In an automation script (.ps1/.psm1),

Replace all uses of the cmdlet Get-BinRoot to use Get-ToolsLocation instead.

Reasoning

The PowerShell cmdlet is badly named, and was replaced with a new cmdlet called Get-ToolsLocation instead. The cmdlet is also deprecated in version 1.0.0 of Chocolatey and will be removed in version 2.0.0 so any calls to the cmdlet should no longer be made.