You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/jenv-change.psm1
+15-16Lines changed: 15 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -10,24 +10,23 @@ function Invoke-Change {
10
10
Write-Host'"jenv change <name>"'
11
11
Write-Host'With this command you set your JAVA_HOME and the version of java to be used globally. This is overwriten by both "jenv local" and "jenv use"'
12
12
Write-Host'<name> is the alias you asigned to the path with "jenv add <name> <path>"'
Copy file name to clipboardExpand all lines: src/jenv-local.psm1
+27-28Lines changed: 27 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -11,39 +11,38 @@ function Invoke-Local {
11
11
Write-Host'This is overwriten by "jenv use"'
12
12
Write-Host'<name> is the alias of the JEnv you want to specify'
13
13
Write-Host"Attention! You might have to call jenv first before it changes your JAVA_HOME to the local environment. The java command will work out of the box"
Write-Host ('Theres no JEnv with name {0} Consider using "jenv list"'-f$name)
19
+
return
20
+
}
21
21
22
-
# Abort Uninstall
23
-
if ((Open-Prompt"Uninstalling JEnv""Are you sure you want to delete JEnv entirely from this computer?""Yes","No""This will remove JEnv from your computer","Last chance to abort the disaster"1) -eq1) {
24
-
Write-Host"Aborted uninstallation"
25
-
return
26
-
}
22
+
# Abort Uninstall
23
+
if ((Open-Prompt"Uninstalling JEnv""Are you sure you want to delete JEnv entirely from this computer?""Yes","No""This will remove JEnv from your computer","Last chance to abort the disaster"1) -eq1) {
[System.Environment]::SetEnvironmentVariable("PATH",$userPath, [System.EnvironmentVariableTarget]::User) # Set globally
59
59
60
-
# Either delete %appdata%/jenv or keep config
61
-
$uninstall=Open-Prompt"Uninstalling JEnv""Do you want to keep your config file""Yes","No""If you reinstall JEnv later it will use all your configured java_homes and locals","If you reinstall JEnv it has to be set up from the ground on. Pick this if you dont plan reinstalling JEnv"0
62
-
if ($uninstall-eq1) {
63
-
Remove-Item$env:appdata/jenv -recurse -force
64
-
}
65
-
#endregion
60
+
# Either delete %appdata%/jenv or keep config
61
+
$uninstall=Open-Prompt"Uninstalling JEnv""Do you want to keep your config file""Yes","No""If you reinstall JEnv later it will use all your configured java_homes and locals","If you reinstall JEnv it has to be set up from the ground on. Pick this if you dont plan reinstalling JEnv"0
0 commit comments