Skip to content

Updated to ensure PSToolbox path appears at the beginning of the PSModulePath environment variable#82

Open
MarkMichaelis wants to merge 1 commit intomainfrom
UpdatedPSToolboxSetupScript
Open

Updated to ensure PSToolbox path appears at the beginning of the PSModulePath environment variable#82
MarkMichaelis wants to merge 1 commit intomainfrom
UpdatedPSToolboxSetupScript

Conversation

@MarkMichaelis
Copy link
Member

No description provided.

if($env:PSModulePath -notlike "*$PSToolboxPath*") {
Script:Set-EnvironmentVariable -Name 'PSModulePath' -Value "$PSToolboxPath;$env:PSModulePath"
if($env:PSModulePath -notlike "$PSToolboxPath*") {
$UpdatedPSModulePath = "$PSToolboxPath;$(($env:PSModulePath -split ';' | Where-Object{ $_ -ne 'C:\Git\PSToolbox\Modules' }) -join ';')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work on my machine? C:\Git\PSToolbox\Modules isn't the path to my source tree. Should it be $pwd\Modules?

@twofingerrightclick twofingerrightclick force-pushed the main branch 2 times, most recently from 0a6b3e3 to f557847 Compare December 15, 2022 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants