mirror of
https://github.com/pyenv/pyenv.git
synced 2026-10-02 23:41:06 +09:00
pwsh: Fix error in shell integration if pyenv is on PATH multiple times
Fixes "The term 'pyenv pyenv' is not recognized..."
This commit is contained in:
parent
798a1ad603
commit
88e9ab13e8
@ -473,12 +473,12 @@ function pyenv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( ("${commands[*]}" -split ' ') -contains \$command ) {
|
if ( ("${commands[*]}" -split ' ') -contains \$command ) {
|
||||||
\$shell_cmds = (& (get-command -commandtype application pyenv) sh-\$command \$args)
|
\$shell_cmds = (& (get-command -commandtype application pyenv -totalcount 1) sh-\$command \$args)
|
||||||
if ( \$shell_cmds.Count -gt 0 ) {
|
if ( \$shell_cmds.Count -gt 0 ) {
|
||||||
iex (\$shell_cmds -join "\`n")
|
iex (\$shell_cmds -join "\`n")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
& (get-command -commandtype application pyenv) \$command \$args
|
& (get-command -commandtype application pyenv -totalcount 1) \$command \$args
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user