Fix path #2;Change package manager
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2021-06-22 09:54:45 +02:00
parent 83baeefea0
commit 5b0a8fc7df
2 changed files with 43 additions and 13 deletions

View File

@ -0,0 +1,18 @@
[CmdletBinding()]
Param(
# None
)
$InvokeRestMethodSplat = @{
Uri = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
Method = 'GET'
}
$InvokeWebRequestSplat = @{
Uri = ((Invoke-RestMethod @InvokeRestMethodSplat).assets | Where-Object ${_.name -like '*.appxbundle'}).browser_download_url
Out = "$env:temp\winget.appxbundle"
}
Invoke-WebRequest @InvokeWebRequestSplat
If (Test-Path -Path "$env:temp\winget.appxbundle") {
& dism.exe /Online /Add-ProvisionedAppxPackage /PackagePath:"$env:temp\winget.appxbundle" /SkipLicense
}