chocolatey / boxstarter

Repeatable, reboot resilient windows environment installations made easy using Chocolatey packages
https://boxstarter.org/
Apache License 2.0
1.29k stars 162 forks source link

Use Chocolatey scripting best practices for Boxstarter Chocolatey packages #507

Open gep13 opened 1 year ago

gep13 commented 1 year ago

Is Your Feature Request Related To A Problem? Please describe.

There are instances where scripting best practices are not being following in the packaging scripts for the Boxstarter packages. For example, in the main Boxstarter package there is:

try {
    Write-Host "To load all Boxstarter Modules immediately, just enter 'BoxstarterShell'." -ForegroundColor Yellow
    Write-Host "Interested in Windows Azure VM integration? Run CINST Boxstarter.Azure to install Boxstarter's Azure integration."
} catch {
    throw $_.exception
}

when this should be:

Write-Warning "To load all Boxstarter Modules immediately, just enter 'BoxstarterShell'." 
Write-Host "Interested in Windows Azure VM integration? Run CINST Boxstarter.Azure to install Boxstarter's Azure integration."

Describe The Solution. Why is it needed?

Follow the recommended best practices for packaging scripts.

A full audit of all the packages should be completed.

Additional Context.

N/A

Related Issues

N/A

mwallner commented 2 days ago

If this is being worked on, it might be a good idea to also take a stab at the problems currently detected by PSScriptAnalyzer all over the place... :thinking: