Skip to content

Commit

Permalink
default to 80 term width if not a terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
rsese committed Jan 5, 2023
1 parent 5f5eb03 commit d785f9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ func truncateWorkflowName(name string, length int) string {
}

func getTerminalWidth() int {
if !term.IsTerminal(int(os.Stdout.Fd())) {
return 80
}

width, _, err := term.GetSize(int(os.Stdout.Fd()))

if err != nil {
Expand Down

0 comments on commit d785f9e

Please sign in to comment.