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."
52
52
try {
53
53
[System.Object ]$GithubRestData = Invoke-RestMethod - Uri $GitHubUrl - Method Get - Headers $GithubHeaders - TimeoutSec 10 | Select-Object - Property assets, body
54
54
[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 ) {
56
57
[System.Object ]$GitHubGit = [PSCustomObject ]@ {
57
58
DownloadUrl = [string ]$GitHubAsset.browser_download_url
58
59
Hash = [string ]$Matches [1 ].ToUpper()
You can’t perform that action at this time.
0 commit comments