File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
azure-self-hosted-runners Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ Write-Output "Starting post-deployment script."
5252try {
5353 [System.Object ]$GithubRestData = Invoke-RestMethod - Uri $GitHubUrl - Method Get - Headers $GithubHeaders - TimeoutSec 10 | Select-Object - Property assets, body
5454 [System.Object ]$GitHubAsset = $GithubRestData.assets | Where-Object { $_.name -match $GithubExeName }
55- if ($GithubRestData.body -match " \b${[Regex]::Escape($GitHubAsset.name)} .*?\|.*?([a-zA-Z0-9]{64})" -eq $True ) {
55+ $AssetNameEscaped = [Regex ]::Escape($GitHubAsset.name )
56+ if ($GithubRestData.body -match " \b${AssetNameEscaped} .*?\|.*?([a-zA-Z0-9]{64})" -eq $True ) {
5657 [System.Object ]$GitHubGit = [PSCustomObject ]@ {
5758 DownloadUrl = [string ]$GitHubAsset.browser_download_url
5859 Hash = [string ]$Matches [1 ].ToUpper()
You can’t perform that action at this time.
0 commit comments