mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 12:13:27 +00:00
Check winget version and require update if necessary (#1087)
Added a check for the winget version to ensure it meets the minimum required version. If the winget version is outdated, the script now exits with an appropriate error message. Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
This commit is contained in:
parent
7cd00dab49
commit
456a642a1f
8
.github/scripts/setup-system.ps1
vendored
8
.github/scripts/setup-system.ps1
vendored
|
@ -162,7 +162,13 @@ https://learn.microsoft.com/windows/package-manager/winget/
|
|||
'@
|
||||
}
|
||||
|
||||
# TODO: Check system winget version is greater or equal to v1.4.10052
|
||||
# Check system winget version is greater or equal to v1.4.10052
|
||||
$wingetVersion = [Version]((winget --version) -replace '.*?(\d+)\.(\d+)\.(\d+).*', '$1.$2.$3')
|
||||
$requiredVersion = [Version]'1.4.10052'
|
||||
if ($wingetVersion.CompareTo($requiredVersion) -lt 0) {
|
||||
$errorMessage = "You need to update your winget to version $requiredVersion or higher."
|
||||
Exit-WithError $errorMessage
|
||||
}
|
||||
|
||||
# Check connectivity to GitHub
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
|
Loading…
Reference in a new issue