diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-23 08:47:38 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-23 08:47:38 +0900 |
| commit | b5b0d6b3ead5d4d65367b57aac5d879975714cd9 (patch) | |
| tree | ba14bc6f53fd9d3908c01139cb5127b2143df540 /src | |
| parent | a90426b7ca59dfe9f97110caf533c450b6855a77 (diff) | |
| download | fzf-b5b0d6b3ead5d4d65367b57aac5d879975714cd9.tar.gz | |
Do not run as winpty proxy if winpty is not available
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core.go b/src/core.go index 9c5ac033..f0728f80 100644 --- a/src/core.go +++ b/src/core.go @@ -3,6 +3,7 @@ package fzf import ( "os" + "os/exec" "sync" "time" @@ -25,7 +26,9 @@ func Run(opts *Options) (int, error) { } 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 { |
