Skip to content

Commit 31476a1

Browse files
committed
source cmd for powershell
1 parent af060ad commit 31476a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkgs/locker/hook.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ const PowershellHook = `function cdhook {
3939
}
4040
}
4141
42-
Set-Alias -Name cd -Option AllScope -Value cdhook`
42+
function vmrsource {
43+
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
44+
}
45+
46+
Set-Alias -Name cd -Option AllScope -Value cdhook
47+
Set-Alias -Name source -Option AllScope --Value vmrsource`
4348

4449
func CdHookForUnix() {
4550
envFilePath := filepath.Join(conf.GetVersionManagerWorkDir(), envs.ShellFileName)

0 commit comments

Comments
 (0)