generated from kachick/anylang-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider using
$PSNativeCommandUseErrorActionPreference
(#57)
* Specify -NoProfile for all pwsh execution to avoid loading profile errors in local testing * Ensure errexit in most powershell scripts * Skip install module if already installed to avoid blocked process in `task default` * Personally I dont develop pwsh module with darwin anymore * Specify -ErrorAction SilentlyContinue for Get-InstalledModule
- Loading branch information
Showing
7 changed files
with
45 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ jobs: | |
matrix: | ||
os: | ||
- ubuntu-24.04 | ||
- macos-14 | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
# https://github.com/PowerShell/PSScriptAnalyzer | ||
Install-Module -Name PSScriptAnalyzer -Force | ||
# https://github.com/pester/pester | ||
Install-Module -Name Pester -Force | ||
# https://github.com/StartAutomating/Benchpress | ||
Install-Module Benchpress -Scope CurrentUser -Force | ||
$PSNativeCommandUseErrorActionPreference = $true | ||
$ErrorActionPreference = 'Stop' | ||
|
||
if (-not (Get-InstalledModule -ErrorAction SilentlyContinue PSScriptAnalyzer )) { | ||
# https://github.com/PowerShell/PSScriptAnalyzer | ||
Install-Module -Name PSScriptAnalyzer -Force | ||
} | ||
|
||
if (-not (Get-InstalledModule -ErrorAction SilentlyContinue Pester)) { | ||
# https://github.com/pester/pester | ||
Install-Module -Name Pester -Force | ||
} | ||
|
||
if (-not (Get-InstalledModule -ErrorAction SilentlyContinue Benchpress)) { | ||
# https://github.com/StartAutomating/Benchpress | ||
Install-Module Benchpress -Scope CurrentUser -Force | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters