Skip to content

Commit c0d927d

Browse files
committed
Use mattn/go-isatty instead of golang.org/x/term
1 parent 8ef8dfe commit c0d927d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

loop.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ import (
1212
"strings"
1313
"time"
1414

15-
"golang.org/x/term"
16-
1715
"github.com/mattn/go-colorable"
16+
"github.com/mattn/go-isatty"
1817

1918
"github.com/hymkor/csvi"
2019
"github.com/hymkor/go-shellcommand"
@@ -310,7 +309,7 @@ func (cfg *Config) Run(driver, dataSourceName string, dbDialect *dialect.Entry)
310309
return ss.Start(ctx, cfg.Script)
311310
}
312311

313-
if !term.IsTerminal(int(os.Stdin.Fd())) && !ss.automatic() {
312+
if !isatty.IsTerminal(os.Stdin.Fd()) && !ss.automatic() {
314313
return ss.StartFromStdin(ctx)
315314
}
316315
return ss.Loop(ctx, ss.newInteractiveIn())

0 commit comments

Comments
 (0)