You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: bootstrap NuGet lazily only when a Nuget/PSGalleryNuget dep is used
Fixes#117. PSDepend was unconditionally downloading nuget.exe at module
load time, even when no NuGet dependencies were declared. Move the
BootStrap-Nuget call out of PSDepend.psm1 and into Nuget.ps1 and
PSGalleryNuget.ps1 so it only runs on demand. Also add a missing `return`
after the nuget-unavailable Write-Error in both scripts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Write-Error"Nuget requires Nuget.exe. Ensure this is in your path, or explicitly specified in $ModuleRoot\PSDepend.Config's NugetPath. Skipping [$DependencyName]"
Write-Error"Nuget requires Nuget.exe. Ensure this is in your path, or explicitly specified in $ModuleRoot\PSDepend.Config's NugetPath. Skipping [$DependencyName]"
119
+
return
120
+
}
113
121
}
114
122
115
123
Write-Verbose-Message "Getting dependency [$DependencyName] from Nuget source [$Source]"
Write-Error"PSGalleryNuget requires Nuget.exe. Ensure this is in your path, or explicitly specified in $ModuleRoot\PSDepend.Config's NugetPath. Skipping [$DependencyName]"
Write-Error"PSGalleryNuget requires Nuget.exe. Ensure this is in your path, or explicitly specified in $ModuleRoot\PSDepend.Config's NugetPath. Skipping [$DependencyName]"
107
+
return
108
+
}
101
109
}
102
110
103
111
Write-Verbose-Message "Getting dependency [$name] from Nuget source [$Source]"
0 commit comments