Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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