Skip to content

Commit

Permalink
fix: truncated information on non-terminal table views
Browse files Browse the repository at this point in the history
  • Loading branch information
tikinang committed Nov 18, 2024
1 parent 261d2af commit 7553350
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/cmdBuilder/executeRootCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"syscall"

"github.com/pkg/errors"
"github.com/zeropsio/zcli/src/terminal"
"golang.org/x/term"
"gopkg.in/yaml.v3"

Expand All @@ -19,6 +18,7 @@ import (
"github.com/zeropsio/zcli/src/logger"
"github.com/zeropsio/zcli/src/storage"
"github.com/zeropsio/zcli/src/support"
"github.com/zeropsio/zcli/src/terminal"
"github.com/zeropsio/zcli/src/uxBlock"
"github.com/zeropsio/zcli/src/uxBlock/styles"
"github.com/zeropsio/zerops-go/apiError"
Expand All @@ -30,15 +30,10 @@ func ExecuteRootCmd(rootCmd *Cmd) {
ctx = support.Context(ctx)

isTerminal := terminal.IsTerminal()

width, _, err := term.GetSize(0)
if err != nil {
width = 100
}

terminalWidth, _, _ := term.GetSize(0)
outputLogger, debugFileLogger := createLoggers(isTerminal)

uxBlocks := uxBlock.NewBlock(outputLogger, debugFileLogger, isTerminal, width, cancel)
uxBlocks := uxBlock.NewBlock(outputLogger, debugFileLogger, isTerminal, terminalWidth, cancel)

cliStorage, err := createCliStorage()
if err != nil {
Expand Down

0 comments on commit 7553350

Please sign in to comment.