MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Execute

Function Execute

app/cli/cmd/root.go:80–93  ·  view source on GitHub ↗
(rootCmd *cobra.Command)

Source from the content-addressed store, hash-verified

78const envPrefix = "CHAINLOOP"
79
80func Execute(rootCmd *cobra.Command) error {
81 if err := rootCmd.Execute(); err != nil {
82 // The local file is pointing to the wrong organization, we remove it
83 if v1.IsUserNotMemberOfOrgErrorNotInOrg(err) {
84 if err := setLocalOrganization(""); err != nil {
85 logger.Debug().Err(err).Msg("failed to remove organization from config")
86 }
87 }
88
89 return err
90 }
91
92 return nil
93}
94
95func NewRootCmd(l zerolog.Logger) *cobra.Command {
96 rootCmd := &cobra.Command{

Callers 1

mainFunction · 0.92

Calls 4

setLocalOrganizationFunction · 0.85
ExecuteMethod · 0.65
DebugMethod · 0.45

Tested by

no test coverage detected