From 456b3718abbf1922cfbd498521c27851250f5496 Mon Sep 17 00:00:00 2001 From: Caleb Spare Date: Thu, 13 Aug 2020 01:18:04 -0700 Subject: [PATCH] Switch to github.com/creack/pty The old pty package uses Setctty in a wrong way that broke in Go 1.15. Updates #77. --- go.mod | 4 +++- go.sum | 4 ++-- reflex.go | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index f159292..e9db82d 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,12 @@ module github.com/cespare/reflex +go 1.15 + require ( + github.com/creack/pty v1.1.11 github.com/fsnotify/fsnotify v1.4.7 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/kr/pretty v0.1.0 - github.com/kr/pty v1.1.2 github.com/ogier/pflag v0.0.1 golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e // indirect ) diff --git a/go.sum b/go.sum index 9d13366..9329c3d 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= @@ -5,8 +7,6 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:C github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.2 h1:Q7kfkJVHag8Gix8Z5+eTo09NFHV8MXL9K66sv9qDaVI= -github.com/kr/pty v1.1.2/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/ogier/pflag v0.0.1 h1:RW6JSWSu/RkSatfcLtogGfFgpim5p7ARQ10ECk5O750= diff --git a/reflex.go b/reflex.go index 85f4eac..f04aa88 100644 --- a/reflex.go +++ b/reflex.go @@ -13,7 +13,7 @@ import ( "syscall" "time" - "github.com/kr/pty" + "github.com/creack/pty" ) // A Reflex is a single watch + command to execute.