Open khill-fbmc opened 1 year ago
My workaround was to just clear $Global:PreviousDir = ""
before calling Set-PsEnv
I ran into the same issue and found the same workaround.
It would be ideal to have a -Force
flag so that the module loads .env
file regardless of whether it is the same folder or not.
CC: @rajivharris Thank you for creating this package. Much appreciated!
I ran into the issue when using this in a script.
On first run of the script, the
.env
is read and$env
is populated. Upon re-run, it fails to load because it thinks we already have (same dir)https://github.com/rajivharris/Set-PsEnv/blob/1be3a967e18827d62e0815040a5f12a4706ae94a/Set-PsEnv.psm1#L35-L40