winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

Microsoft.WinGet.Client.psm1 (684B)


      1 . $PSScriptRoot\Library\Get-WinGetVersion.ps1
      2 
      3 $RequiredVersion = "1.1.12653"
      4 
      5 $version = Get-WinGetVersion
      6 if ($version -lt $RequiredVersion) {
      7     # Need to do localization
      8     Write-Host "Windows Package Manager is missing. For more information on installing the Windows Package Manager. `n  Visit: https://github.com/microsoft/winget-cli#installing-the-client"
      9     throw [WinGetVersionMismatch]::new("Requires Windows Package Manager $RequiredVersion or later to be installed.")
     10 }
     11 
     12 Get-ChildItem -Path $PSScriptRoot\Library -Filter *.ps1 | foreach-object { . $_.FullName }
     13 
     14 class WinGetVersionMismatch : Exception {
     15 	WinGetVersionMismatch([string] $message) : base($message) {}
     16 }