Skip to content

Commit

Permalink
Disable usePackageRepositoryOptimizations
Browse files Browse the repository at this point in the history
- Disable on server during Nexus setup step
- Disable feature in clientsetup script for endpoints
  • Loading branch information
ryanrichter94 committed Aug 29, 2024
1 parent 0c73712 commit a424fdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Start-C4bNexusSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions scripts/ClientSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a424fdd

Please sign in to comment.