diff --git a/internal/lefthook/runner/exec/execute_unix.go b/internal/lefthook/runner/exec/execute_unix.go index 9d3bd563..9958e8b7 100644 --- a/internal/lefthook/runner/exec/execute_unix.go +++ b/internal/lefthook/runner/exec/execute_unix.go @@ -14,7 +14,6 @@ import ( "github.com/creack/pty" "github.com/mattn/go-isatty" - "github.com/mattn/go-tty" "github.com/evilmartians/lefthook/internal/log" ) @@ -35,10 +34,10 @@ func (e CommandExecutor) Execute(ctx context.Context, opts Options, out io.Write in = os.Stdin } if opts.Interactive && !isatty.IsTerminal(os.Stdin.Fd()) { - tty, err := tty.Open() + tty, err := os.Open("/dev/tty") if err == nil { defer tty.Close() - in = tty.Input() + in = tty } else { log.Errorf("Couldn't enable TTY input: %s\n", err) }