Skip to content

Commit 0fcd8c8

Browse files
Fix version handling in PowerShell installation: trim 'v' prefix from specified version input for accurate installation.
1 parent df3c67e commit 0fcd8c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ runs:
2626
$version = $releaseInfo.tag_name.Trim('v')
2727
Write-Host "Latest PowerShell version: $version"
2828
} else {
29+
# Remove the 'v' prefix if it exists
30+
$version = $version.TrimStart('v')
2931
Write-Host "Installing specified PowerShell version: $version"
3032
}
3133

0 commit comments

Comments
 (0)