Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ require (
github.com/hymkor/struct2flag v0.0.4
github.com/lib/pq v1.10.9
github.com/mattn/go-colorable v0.1.14
github.com/mattn/go-isatty v0.0.20
github.com/microsoft/go-mssqldb v1.7.2
github.com/nyaosorg/go-box/v3 v3.0.0
github.com/nyaosorg/go-readline-ny v1.12.3
github.com/nyaosorg/go-ttyadapter v0.2.0
github.com/sijms/go-ora/v2 v2.8.22
golang.org/x/term v0.29.0
)

require (
Expand All @@ -28,7 +28,6 @@ require (
github.com/golang-sql/sqlexp v0.1.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hymkor/sxencode-go v0.3.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.19 // indirect
github.com/mattn/go-tty v0.0.7 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
Expand Down
5 changes: 2 additions & 3 deletions loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ import (
"strings"
"time"

"golang.org/x/term"

"github.com/mattn/go-colorable"
"github.com/mattn/go-isatty"

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

if !term.IsTerminal(int(os.Stdin.Fd())) && !ss.automatic() {
if !isatty.IsTerminal(os.Stdin.Fd()) && !ss.automatic() {
return ss.StartFromStdin(ctx)
}
return ss.Loop(ctx, ss.newInteractiveIn())
Expand Down