diff --git a/Start-C4bNexusSetup.ps1 b/Start-C4bNexusSetup.ps1 index f1ac3be..0fe5607 100644 --- a/Start-C4bNexusSetup.ps1 +++ b/Start-C4bNexusSetup.ps1 @@ -90,6 +90,9 @@ process { Write-Error "ChocolateyInstall.ps1 script signature is not valid. Please investigate." } + # Nexus NuGet V3 Compatibility + choco feature disable --name="'usePackageRepositoryOptimizations'" + # Add ChocolateyInternal as a source repository choco source add -n 'ChocolateyInternal' -s "$((Get-NexusRepository -Name 'ChocolateyInternal').url)/index.json" --priority 1 diff --git a/scripts/ClientSetup.ps1 b/scripts/ClientSetup.ps1 index 45e1665..a7d070f 100644 --- a/scripts/ClientSetup.ps1 +++ b/scripts/ClientSetup.ps1 @@ -111,6 +111,9 @@ $script = $webClient.DownloadString("https://${hostAddress}/repository/choco-ins choco config set cacheLocation $env:ChocolateyInstall\choco-cache choco config set commandExecutionTimeoutSeconds 14400 +# Nexus NuGet V3 Compatibility +choco feature disable --name="'usePackageRepositoryOptimizations'" + if ($InternetEnabled) { choco source add --name="'ChocolateyInternal'" --source="'$RepositoryUrl'" --allow-self-service --user="'$($Credential.UserName)'" --password="'$($Credential.GetNetworkCredential().Password)'" --priority=1 }