JustinGrote / ModuleFast

A "fast and loose" way to install modules from Powershell Gallery quickly. Meant for CICD, not production
Other
74 stars 5 forks source link

✨ Add -DestinationOnly switch #50

Closed JustinGrote closed 7 months ago

JustinGrote commented 7 months ago

Fixes #45

This pull request fixes an issue with the Install-ModuleFast function where it doesn't install modules in the specified destination if the same module is already installed in a different location on the system.

To address this issue, I have added a new parameter -DestinationOnly to the Install-ModuleFast function. When this parameter is specified, the function will only consider the specified destination and not any other paths currently in the PSModulePath. This is useful for scenarios where you want to ensure that the modules are installed in a specific location, such as in a CI environment.

I have also made changes to the Get-ModuleFastPlan and Find-LocalModule functions to support the new -DestinationOnly parameter.