mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
fix: use precise regex in install.ps1 asset matching
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/bfeecfa8-81d9-45da-b1a7-b2dd6804b34f Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
This commit is contained in:
parent
8c4acb0ad5
commit
53afc252ea
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ Write-Host "Fetching latest release information..."
|
|||
$release = Invoke-RestMethod -Uri $apiUrl -UseBasicParsing
|
||||
|
||||
# --- Locate the correct asset ---
|
||||
$asset = $release.assets | Where-Object { $_.name -like "*-$suffix.exe" } | Select-Object -First 1
|
||||
$asset = $release.assets | Where-Object { $_.name -match "^MinecraftClient-.*-$([regex]::Escape($suffix))\.exe$" } | Select-Object -First 1
|
||||
|
||||
if (-not $asset) {
|
||||
Write-Error "Could not find a release asset for '$suffix'."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue