From 7c80af944c7ffdcbc1c162d70049edfc6082c04e Mon Sep 17 00:00:00 2001 From: j3ssie Date: Sun, 15 Oct 2023 22:16:31 +0700 Subject: [PATCH] Update v4.6.1 --- cmd/health.go | 6 ++++-- utils/helper.go | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cmd/health.go b/cmd/health.go index daa032a..e527558 100644 --- a/cmd/health.go +++ b/cmd/health.go @@ -242,7 +242,8 @@ func listFlows() error { table.SetAutoFormatHeaders(false) table.SetHeader([]string{"Flow Name", "Description"}) table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true}) - table.SetColWidth(120) + table.SetColWidth(110) + table.SetAutoWrapText(true) table.AppendBulk(content) table.Render() @@ -278,7 +279,8 @@ func listDefaultModules() error { table.SetAutoFormatHeaders(false) table.SetHeader([]string{"Module Name", "Description"}) table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true}) - table.SetColWidth(120) + table.SetColWidth(110) + table.SetAutoWrapText(true) table.AppendBulk(content) table.Render() diff --git a/utils/helper.go b/utils/helper.go index 76ceeb9..48d42cd 100644 --- a/utils/helper.go +++ b/utils/helper.go @@ -420,13 +420,13 @@ func runCommandWithError(cmd string) (string, error) { go func() { for scanner.Scan() { out := scanner.Text() - Debug(out) + DebugF(out) output += out + "\n" } }() go func() { for errScanner.Scan() { - Error(errScanner.Text()) + DebugF(errScanner.Text()) } }() if err := realCmd.Start(); err != nil { @@ -461,7 +461,6 @@ func RunCommandWithErr(command string, timeoutRaw ...string) (string, error) { select { case <-c.Done(): - return output, err case <-time.After(time.Duration(timeout) * time.Second): return out, fmt.Errorf("command got timeout") @@ -492,7 +491,7 @@ func RunCommandSteamOutput(cmd string) (string, error) { }() go func() { for errScanner.Scan() { - ErrorF(errScanner.Text()) + DebugF(errScanner.Text()) } }() if err := realCmd.Start(); err != nil { @@ -522,7 +521,7 @@ func RunOSCommand(cmd string) (string, error) { go func() { for scanner.Scan() { out := scanner.Text() - Debug(out) + DebugF(out) output += out } }()