Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
Merge pull request #3 from bandorko/fix-hidden-cursor-on-interrupt
Browse files Browse the repository at this point in the history
fix: cursor disappeared in terminal after interrupt
  • Loading branch information
szkiba authored Sep 25, 2023
2 parents d4bbdb6 + a79a661 commit 633a15e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"context"
"io"
"os"
"os/signal"
"path/filepath"
"text/template"

Expand Down Expand Up @@ -46,6 +47,15 @@ func main(

initLogger(opts)

c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
go func() {
for range c {
opts.spinner.Stop()
os.Exit(1)
}
}()

res := resolver.NewWithCacheDir(opts.dirs.http)
cmd := filepath.Join(opts.dirs.bin, k6Binary)

Expand Down

0 comments on commit 633a15e

Please sign in to comment.