mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-06 23:22:04 -07:00
Do not run as winpty proxy if winpty is not available
This commit is contained in:
@@ -3,6 +3,7 @@ package fzf
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"os/exec"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -25,7 +26,9 @@ func Run(opts *Options) (int, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if os.Getenv("TERM_PROGRAM") == "mintty" && !opts.NoWinpty {
|
if os.Getenv("TERM_PROGRAM") == "mintty" && !opts.NoWinpty {
|
||||||
return runWinpty(os.Args, opts)
|
if _, err := exec.LookPath("winpty"); err == nil {
|
||||||
|
return runWinpty(os.Args, opts)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := postProcessOptions(opts); err != nil {
|
if err := postProcessOptions(opts); err != nil {
|
||||||
|
Reference in New Issue
Block a user