Skip to content

Commit 6bc6444

Browse files
committed
Fix powershell deactivation.
1 parent 7340212 commit 6bc6444

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

spork/pm.janet

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -672,18 +672,17 @@
672672
$$global:_OLD_PATH=$$env:PATH
673673
$$env:JANET_PATH="$abspath"
674674
$$env:PATH=$$JANET_PATH + "/bin:" + $$env:PATH
675-
$$old_prompt = Get-Content function:prompt
675+
$$function:old_prompt = $$function:prompt
676676
function global:prompt {
677677
Write-Host "($name) " -NoNewline
678-
& $$old_prompt
678+
& $$function:old_prompt
679679
}
680680
function deactivate {
681681
$$env:PATH=$$global:_OLD_PATH
682682
$$env:JANET_PATH=$$global:_OLD_JANET_PATH
683683
Remove-Item function:\deactivate
684-
function global:prompt {
685-
& $$old_prompt
686-
}
684+
$$function:prompt = $$function:old_prompt
685+
Remove-Item function:\old_prompt
687686
}
688687
````)
689688

0 commit comments

Comments
 (0)