From 6426ea112f0736d9b81da6dad5b6fa2cfe9b7fed Mon Sep 17 00:00:00 2001 From: derailed Date: Wed, 19 May 2021 23:54:08 -0600 Subject: [PATCH] windows shell fix --- .goreleaser.yml | 2 +- Makefile | 2 +- change_logs/release_v0.24.10.md | 23 +++++++++++++++++++++++ go.mod | 6 +++--- go.sum | 8 ++++---- internal/view/exec.go | 10 +++++++--- internal/view/help.go | 1 - 7 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 change_logs/release_v0.24.10.md diff --git a/.goreleaser.yml b/.goreleaser.yml index 0d69bb2f..70316cba 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -24,7 +24,7 @@ builds: ldflags: - -s -w -X github.com/derailed/k9s/cmd.version=v{{.Version}} -X github.com/derailed/k9s/cmd.commit={{.Commit}} -X github.com/derailed/k9s/cmd.date={{.Date}} archives: - - name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" + - name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}" replacements: darwin: Darwin linux: Linux diff --git a/Makefile b/Makefile index 0ead1647..f68b2494 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PACKAGE := github.com/derailed/$(NAME) GIT := $(shell git rev-parse --short HEAD) SOURCE_DATE_EPOCH ?= $(shell date +%s) DATE := $(shell date -u -d @${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:%M:%SZ") -VERSION ?= v0.24.9 +VERSION ?= v0.24.10 IMG_NAME := derailed/k9s IMAGE := ${IMG_NAME}:${VERSION} diff --git a/change_logs/release_v0.24.10.md b/change_logs/release_v0.24.10.md new file mode 100644 index 00000000..6dbb1ad4 --- /dev/null +++ b/change_logs/release_v0.24.10.md @@ -0,0 +1,23 @@ + + +# Release v0.24.10 + +## Notes + +Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better are as ever very much noted and appreciated! + +If you feel K9s is helping your Kubernetes journey, please consider joining our [sponsorhip program](https://github.com/sponsors/derailed) and/or make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer) + +On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM) + +## Maintenance Release! + +--- + +## Resolved Issues + +* [Issue #1123](https://github.com/derailed/k9s/issues/1123) Cannotresponse to keyboard strike after exit pod shell in windows 10 + +--- + + © 2020 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/go.mod b/go.mod index 9e95ef21..559f0a1a 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 replace ( github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d github.com/docker/docker => github.com/moby/moby v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible - github.com/gdamore/tcell/v2 => github.com/derailed/tcell/v2 v2.2.1-rc.6 + github.com/gdamore/tcell/v2 => github.com/derailed/tcell/v2 v2.3.1-rc.2 ) require ( @@ -19,7 +19,7 @@ require ( github.com/fatih/color v1.10.0 github.com/fsnotify/fsnotify v1.4.9 github.com/fvbommel/sortorder v1.0.2 - github.com/gdamore/tcell/v2 v2.2.1 + github.com/gdamore/tcell/v2 v2.3.1 github.com/ghodss/yaml v1.0.0 github.com/kylelemons/godebug v1.1.0 // indirect github.com/mattn/go-runewidth v0.0.12 @@ -28,7 +28,7 @@ require ( github.com/openfaas/faas-provider v0.15.0 github.com/petergtz/pegomock v2.9.0+incompatible github.com/rakyll/hey v0.1.4 - github.com/rs/zerolog v1.21.0 + github.com/rs/zerolog v1.22.0 github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sahilm/fuzzy v0.1.0 github.com/spf13/cobra v1.1.3 diff --git a/go.sum b/go.sum index 9a8a736d..ed2ad5eb 100644 --- a/go.sum +++ b/go.sum @@ -191,8 +191,8 @@ github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xb github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/derailed/popeye v0.9.0 h1:0zP4BAzo94RUjrUkzgF962v0zL9B3xyopd7kU7tMxuc= github.com/derailed/popeye v0.9.0/go.mod h1:g3hudQlbEEChCA7U44fA+utTM9xQpD4pINUMQaiq5Gs= -github.com/derailed/tcell/v2 v2.2.1-rc.6 h1:4OYLuVMZKuw6j/1dTao2dPhoMAZVsb9uKG65yW749pM= -github.com/derailed/tcell/v2 v2.2.1-rc.6/go.mod h1:0qLNzFYW8f0XhbEkwYtmnT8HYs3o4kuMsdkLEUKfAX0= +github.com/derailed/tcell/v2 v2.3.1-rc.2 h1:9TmZB/IwL3MA1Jf4pC4rfMaPTcVYIN62IwE7X7A9emU= +github.com/derailed/tcell/v2 v2.3.1-rc.2/go.mod h1:wegJ+SscH+jPjEQIAV/dI/grLTRm5R4IE2M479NDSL0= github.com/derailed/tview v0.6.1 h1:dB+9bO7r6a1Yg1HE+XNJj61hioauJnGBFq2biC5bjAk= github.com/derailed/tview v0.6.1/go.mod h1:5Wjopun0Jw3zxOFtafwc/GlrkFJix1hZz1oQetWpnwE= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -670,8 +670,8 @@ github.com/rogpeppe/go-internal v1.4.0 h1:LUa41nrWTQNGhzdsZ5lTnkwbNjj6rXTdazA1cS github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.18.0/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= -github.com/rs/zerolog v1.21.0 h1:Q3vdXlfLNT+OftyBHsU0Y445MD+8m8axjKgf2si0QcM= -github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= +github.com/rs/zerolog v1.22.0 h1:XrVUjV4K+izZpKXZHlPrYQiDtmdGiCylnT4i43AAWxg= +github.com/rs/zerolog v1.22.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 h1:HXr/qUllAWv9riaI4zh2eXWKmCSDqVS/XH1MRHLKRwk= github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351/go.mod h1:DCgfY80j8GYL7MLEfvcpSFvjD0L5yZq/aZUJmhZklyg= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= diff --git a/internal/view/exec.go b/internal/view/exec.go index f5f1a126..b477b0db 100644 --- a/internal/view/exec.go +++ b/internal/view/exec.go @@ -103,9 +103,13 @@ func execute(opts shellOpts) error { sigChan := make(chan os.Signal, 1) signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM) go func() { - <-sigChan - log.Debug().Msg("Command canceled with signal!") - cancel() + select { + case <-sigChan: + log.Debug().Msg("Command canceled with signal!") + cancel() + case <-ctx.Done(): + return + } }() log.Debug().Msgf("Running command> %s %s", opts.binary, strings.Join(opts.args, " ")) diff --git a/internal/view/help.go b/internal/view/help.go index 6bf2c8d5..7e0d89d8 100644 --- a/internal/view/help.go +++ b/internal/view/help.go @@ -100,7 +100,6 @@ func (h *Help) computeExtraMaxes(ee map[string]string) { } func (h *Help) build() { - log.Debug().Msgf("BUILD!!") h.Clear() sections := []string{"RESOURCE", "GENERAL", "NAVIGATION", "HELP"}