We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pwsh-preview
1 parent 359723c commit 0777397Copy full SHA for 0777397
.github/workflows/Action-Test.yml
@@ -72,7 +72,13 @@ jobs:
72
}
73
74
# Actual version installed by the action
75
- $installed = ($PSVersionTable.PSVersion).ToString()
+ # Preview builds install the executable named 'pwsh-preview' on Windows,
76
+ # so query that binary
77
+ if ('${{ matrix.version }}'.Trim().ToLower() -eq 'preview' -and $IsWindows) {
78
+ $installed = (pwsh-preview -NoLogo -NoProfile -Command '$PSVersionTable.PSVersion.ToString()')
79
+ } else {
80
+ $installed = ($PSVersionTable.PSVersion).ToString()
81
+ }
82
Write-Host "Installed PowerShell version: $installed"
83
Write-Host "Expected PowerShell version: $requested"
84
0 commit comments