Skip to content

Commit

Permalink
jenv use remove working
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixSelter committed Mar 14, 2022
1 parent eb90028 commit 5a04051
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/jenv-use.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ function Invoke-Use {
}
else {

# Remove the local JEnv
if ($name -eq "remove") {
$Env:JENVUSE = $null # Set for powershell users
Set-Content -path "jenv.use.tmp" -value $null # Create temp file so no restart of the active shell is required
Write-Host Your session JEnv was unset
return
}


# Check if specified JEnv is avaible
$jenv = $config.jenvs | Where-Object { $_.name -eq $name }
if ($null -eq $jenv) {
Expand Down

0 comments on commit 5a04051

Please sign in to comment.