diff --git a/cmd/headscale/cli/namespaces.go b/cmd/headscale/cli/namespaces.go index e0bc0f20..c35c02cc 100644 --- a/cmd/headscale/cli/namespaces.go +++ b/cmd/headscale/cli/namespaces.go @@ -101,6 +101,9 @@ var listNamespacesCmd = &cobra.Command{ for _, n := range *namespaces { d = append(d, []string{strconv.FormatUint(uint64(n.ID), 10), n.Name, n.CreatedAt.Format("2006-01-02 15:04:05")}) } - pterm.DefaultTable.WithHasHeader().WithData(d).Render() + err = pterm.DefaultTable.WithHasHeader().WithData(d).Render() + if err != nil { + log.Fatal(err) + } }, } diff --git a/cmd/headscale/cli/nodes.go b/cmd/headscale/cli/nodes.go index fdcaf760..d72201c9 100644 --- a/cmd/headscale/cli/nodes.go +++ b/cmd/headscale/cli/nodes.go @@ -94,8 +94,10 @@ var listNodesCmd = &cobra.Command{ log.Fatalf("Error converting to table: %s", err) } - pterm.DefaultTable.WithHasHeader().WithData(d).Render() - + err = pterm.DefaultTable.WithHasHeader().WithData(d).Render() + if err != nil { + log.Fatal(err) + } }, } diff --git a/cmd/headscale/cli/preauthkeys.go b/cmd/headscale/cli/preauthkeys.go index 4d07928d..1340267e 100644 --- a/cmd/headscale/cli/preauthkeys.go +++ b/cmd/headscale/cli/preauthkeys.go @@ -81,7 +81,10 @@ var listPreAuthKeys = &cobra.Command{ }) } - pterm.DefaultTable.WithHasHeader().WithData(d).Render() + err = pterm.DefaultTable.WithHasHeader().WithData(d).Render() + if err != nil { + log.Fatal(err) + } }, }