Move NuGet provider installation to prerequisites

This commit is contained in:
Manuel Thalmann 2023-07-19 09:41:22 +02:00
parent 117157a861
commit c098b6060c
2 changed files with 4 additions and 2 deletions

View file

@ -11,7 +11,6 @@ function Invoke-WindowsInstallation([Context] $context)
$configPath = "$PSScriptRoot/../Config";
Enable-WindowsOptionalFeature -Online -All -FeatureName "NetFx3";
powershell -c Install-PackageProvider -Name NuGet -Force;
. "$configPath/Windows/Install.ps1" $context;
. "$configPath/Explorer/Install.ps1" $context;
@ -22,7 +21,6 @@ function Invoke-WindowsInstallation([Context] $context)
}
Write-Host "Starting Installation and Restoration of Windows";
. "$PSScriptRoot/../Scripts/Prerequisites.ps1";
Update-WindowsInstallation $context;
if (-not $context.Get("SoftwarePrerequisitesInstalled")) {

View file

@ -1,4 +1,8 @@
#!/bin/pwsh
if (-not (powershell -c Get-PackageProvider -ListAvailable NuGet)) {
powershell -c Install-PackageProvider -Name NuGet -Force;
}
foreach ($module in @("PSWindowsUpdate", "KnownFolders"))
{
if (-not (Get-Module -ListAvailable $module))