Skip to content

Commit af878ff

Browse files
committed
Fixed #15 Now only the userpath is edited and system path does not get copied to it
1 parent 69ed4e4 commit af878ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jenv.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function Invoke-Use {
8585
$Env:JAVA_HOME = $config.Get_Item($name)
8686

8787
$newPath = ""
88-
$($Env:Path.split(';', [System.StringSplitOptions]::RemoveEmptyEntries)).foreach{
88+
$([System.Environment]::GetEnvironmentVariable('PATH','User').split(';', [System.StringSplitOptions]::RemoveEmptyEntries)).foreach{
8989
$path = $_
9090
if ($path -notmatch '\\$') { $path += '\' }
9191
if (!(Test-Path $path"java.exe")) {

0 commit comments

Comments
 (0)