Closed trackd closed 6 months ago
Good note, I don't think I actually did a test for CurrentUser, it was kind of an afterthought because one of the goals of modulefast is to not use that terrible Documents directory on windows due to all the onedrive sync issues. I'll consider fixing this up though.
the bug was not related to CurrentUser.
the "bug" is that $PSModulePaths
is a nonexistant variable.
if ($defaultRepoPath -ne $Destination -and $Destination -notin $PSModulePaths) {
i cannot find that variable in the code atleast. https://github.com/search?q=repo%3AJustinGrote%2FModuleFast%20%24PSModulePaths&type=code
so that will always be $true
i should probably have restructured my first post a bit.
my point regarding CurrentUser was that would allow for similar syntax as Install-Module
/Install-PSResource
I'll consider fixing this up though.
i can submit a pr if you prefer.
oh probably just a goof on my part. If you want to PR it I'll definitely review it
Try it with the latest commit instructions: https://github.com/JustinGrote/ModuleFast?tab=readme-ov-file#testing-latest-commit
Hey,
was testing this out a bit,
I was just curious if this wouldnt make more sense to be changed,
But the implication when you choose 'CurrentUser' (on Windows)
That already means we do not need to update the
$env:PSModulePath
or the$Profile
so could just disable the updates.as i was typing this out i found the bug that was causing it. $PSModulePaths is not defined
just needs to add
to
Install-ModuleFast
functioncould still set the values in the'CurrentUser' block so it skips NoPSModulePathUpdate check for that scenario.