File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,8 +72,7 @@ var telemetryWg sync.WaitGroup
7272// Environment variable prefix for vipers
7373const envPrefix = "CHAINLOOP"
7474
75- func Execute (l zerolog.Logger ) error {
76- rootCmd := NewRootCmd (l )
75+ func Execute (rootCmd * cobra.Command ) error {
7776 if err := rootCmd .Execute (); err != nil {
7877 // The local file is pointing to the wrong organization, we remove it
7978 if v1 .IsUserNotMemberOfOrgErrorNotInOrg (err ) {
Original file line number Diff line number Diff line change 11//
2- // Copyright 2023 The Chainloop Authors.
2+ // Copyright 2023-2025 The Chainloop Authors.
33//
44// Licensed under the Apache License, Version 2.0 (the "License");
55// you may not use this file except in compliance with the License.
@@ -34,9 +34,9 @@ import (
3434func main () {
3535 // Couldn't find an easier way to disable the timestamp
3636 logger := zerolog .New (zerolog.ConsoleWriter {Out : os .Stderr , FormatTimestamp : func (interface {}) string { return "" }})
37-
37+ rootCmd := cmd . NewRootCmd ( logger )
3838 // Run the command
39- if err := cmd .Execute (logger ); err != nil {
39+ if err := cmd .Execute (rootCmd ); err != nil {
4040 msg , exitCode := errorInfo (err , logger )
4141 logger .Error ().Msg (msg )
4242 os .Exit (exitCode )
You can’t perform that action at this time.
0 commit comments