Install winget
only if necessary
This commit is contained in:
parent
319daa374b
commit
140071c493
1 changed files with 4 additions and 1 deletions
|
@ -32,7 +32,10 @@ function Invoke-WindowsInstallation([Context] $context)
|
|||
|
||||
if (-not $context.Get("SoftwarePrerequisitesInstalled")) {
|
||||
Write-Host "Installing prerequisites for installing software";
|
||||
choco install -y winget;
|
||||
|
||||
if (-not $(Get-Command winget)) {
|
||||
choco install -y winget;
|
||||
}
|
||||
|
||||
Install-Module -AcceptLicense -Force "NuGet";
|
||||
Import-Module NuGet;
|
||||
|
|
Loading…
Reference in a new issue