RamblingCookieMonster / PSDepend

PowerShell Dependency Handler
MIT License
285 stars 76 forks source link

Why does PSDepend Bootstrap-Nuget even if we're not using nuget dependencies #117

Open gaelcolas opened 4 years ago

gaelcolas commented 4 years ago

I found that it always tries to download Nuget from the web even when Nuget is not used as a dependency... (i.e. when using PS Module dependencies).

I also don't see a way to configure PSDepend "not to do that".

Is there any reason I'm missing, or would you accept a PR to change that (ideally, a param would be good, but because it's at module load, I wonder how we could make this work?

RamblingCookieMonster commented 4 years ago

Yeah, totally should not do that if we can avoid it! Open to suggestions. Including it in the nuget dependency type? Environment variable (:shrug:)?

gaelcolas commented 4 years ago

thanks for sanity check :)

I'll have a closer look at the code, but I'm not a fan of environment variables for that.

In the meantime, my hack is: Set-Alias 'nuget.exe' echo 🤣