mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-06 00:36:35 +00:00
WIP: psscriptanalyzer
This commit is contained in:
25
psscriptanalyzer/README.md
Normal file
25
psscriptanalyzer/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: PSScriptAnalyzer
|
||||
homepage: https://github.com/PowerShell/PSScriptAnalyzer
|
||||
tagline: |
|
||||
PSScriptAnalyzer is Formatter & Linter for PowerShell.
|
||||
---
|
||||
|
||||
To update or switch versions, run `webi psscriptanalyzer`.
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
### Files
|
||||
|
||||
These are the files / directories that are created and/or modified with this
|
||||
install:
|
||||
|
||||
```text
|
||||
~/.local/share/powershell/Modules/
|
||||
```
|
||||
|
||||
## Check the Installed Version
|
||||
|
||||
```pwsh
|
||||
Get-Module -ListAvailable
|
||||
```
|
||||
15
psscriptanalyzer/install.sh
Normal file
15
psscriptanalyzer/install.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
__install_psscriptanalyzer() {
|
||||
echo "Checking for pwsh (PowerShell Core)..."
|
||||
if ! command -v pwsh > /dev/null; then
|
||||
"$HOME/.local/bin/webi" pwsh
|
||||
export PATH="$HOME/.local/opt/pwsh:$PATH"
|
||||
fi
|
||||
|
||||
pwsh -Command "Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -AllowClobber"
|
||||
}
|
||||
|
||||
__install_psscriptanalyzer
|
||||
Reference in New Issue
Block a user