cmd/root: don't double print errors
If not explicitly disabled, cobra prints errors in `cmd.Execute`, i.e.
no need to log it a second time.
Currently the user gets to see:
```
Error: Kubeconfig "/home/schu/.kube/config" not found
[...]
FATA[0000] Error in executing lokoctl: Kubeconfig "/home/schu/.kube/config" not found
```
package cmd
import (
- log "github.com/sirupsen/logrus"
+ "os"
+
"github.com/spf13/cobra"
)
@@ -14,6 +15,6 @@ var rootCmd = &cobra.Command{
func Execute() {
if err := rootCmd.Execute(); err != nil {
- log.Fatalf("Error in executing lokoctl: %v", err)
+ os.Exit(1)
}
}
