From 4a82d77e0b23bc0444e79d125a59973554e6150b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20L=2E=20Hansen?= Date: Sat, 10 Apr 2021 23:38:29 -0700 Subject: [PATCH] Build for Solaris Refresh pty import and add Solaris as a cross compile target --- Makefile | 2 +- NEWS.md | 1 + backend/localcommand/local_command.go | 6 +++--- go.mod | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 22c386a..017e798 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,7 @@ test: if [ `go fmt $(go list ./... | grep -v /vendor/) | wc -l` -gt 0 ]; then echo "go fmt error"; exit 1; fi cross_compile: - GOARM=5 gox -os="darwin linux freebsd netbsd openbsd" -arch="386 amd64 arm" -osarch="!darwin/arm" -output "${OUTPUT_DIR}/pkg/{{.OS}}_{{.Arch}}/{{.Dir}}" + GOARM=5 gox -os="darwin linux freebsd netbsd openbsd solaris" -arch="386 amd64 arm" -osarch="!darwin/arm" -output "${OUTPUT_DIR}/pkg/{{.OS}}_{{.Arch}}/{{.Dir}}" targz: mkdir -p ${OUTPUT_DIR}/dist diff --git a/NEWS.md b/NEWS.md index f47bdb7..73c75ea 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,4 +7,5 @@ * Fix printing of ipv6 addresses (Thanks, @Felixoid!) * Add Progressive Web App support (Thanks, @sehaas!) * Add instructions for GNU screen (Thanks, @Immortalin!) + * Add Solaris support (Thanks, @fazalmajid!) * New maintainer: @sorenisanerd diff --git a/backend/localcommand/local_command.go b/backend/localcommand/local_command.go index b4cbeeb..aed5556 100644 --- a/backend/localcommand/local_command.go +++ b/backend/localcommand/local_command.go @@ -6,7 +6,7 @@ import ( "syscall" "time" - "github.com/kr/pty" + "github.com/creack/pty" "github.com/pkg/errors" ) @@ -101,8 +101,8 @@ func (lcmd *LocalCommand) ResizeTerminal(width int, height int) error { window := pty.Winsize{ Rows: uint16(height), Cols: uint16(width), - X: 0, - Y: 0, + X: 0, + Y: 0, } err := pty.Setsize(lcmd.pty, &window) if err != nil { diff --git a/go.mod b/go.mod index d377bae..1e6e6cd 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.13 require ( github.com/NYTimes/gziphandler v1.1.1 + github.com/creack/pty v1.1.7 github.com/elazarl/go-bindata-assetfs v1.0.0 github.com/fatih/structs v1.1.0 github.com/gorilla/websocket v1.4.1