mirror of
https://github.com/timsutton/brigadier.git
synced 2025-06-05 01:13:50 -04:00
Use System.Version for version comparisons
This commit is contained in:
parent
4fb8a3e54d
commit
a55697dadc
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ if (!(Test-Path $OutputDir)) { New-Item -Path $OutputDir -ItemType Directory -Fo
|
||||||
# Check if at least 7zip 15.14 is installed. If not, download and install it.
|
# Check if at least 7zip 15.14 is installed. If not, download and install it.
|
||||||
$7z = "$env:ProgramFiles\7-Zip\7z.exe"
|
$7z = "$env:ProgramFiles\7-Zip\7z.exe"
|
||||||
if (Test-Path $7z) { $7zInstalled = $true }
|
if (Test-Path $7z) { $7zInstalled = $true }
|
||||||
if ([decimal](Get-ItemProperty $7z).VersionInfo.FileVersion -lt 15.14) {
|
if ([version](Get-ItemProperty $7z).VersionInfo.FileVersion -lt 15.14) {
|
||||||
Invoke-WebRequest -Uri $SEVENZIP_URL -OutFile "$OutputDir\$($SEVENZIP_URL.Split('/')[-1])" -ErrorAction Stop
|
Invoke-WebRequest -Uri $SEVENZIP_URL -OutFile "$OutputDir\$($SEVENZIP_URL.Split('/')[-1])" -ErrorAction Stop
|
||||||
Start-Process -FilePath $env:SystemRoot\System32\msiexec.exe -ArgumentList "/i $OutputDir\$($SEVENZIP_URL.Split('/')[-1]) /qb- /norestart" -Wait -Verbose
|
Start-Process -FilePath $env:SystemRoot\System32\msiexec.exe -ArgumentList "/i $OutputDir\$($SEVENZIP_URL.Split('/')[-1]) /qb- /norestart" -Wait -Verbose
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue