diff --git a/cmd/root.go b/cmd/root.go index 51af5fb..247ce54 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -322,7 +322,8 @@ func isLoadDeploymentRPC(cmd *cobra.Command) bool { func shouldSkipValidation(cmd *cobra.Command) bool { var excludedCommands = map[string]struct{}{ - "cre logout": {}, + "cre logout": {}, + "cre workflow simulate": {}, } _, exists := excludedCommands[cmd.CommandPath()] diff --git a/internal/credentials/credentials.go b/internal/credentials/credentials.go index 6b53867..bb4daec 100644 --- a/internal/credentials/credentials.go +++ b/internal/credentials/credentials.go @@ -58,14 +58,16 @@ func New(logger *zerolog.Logger) (*Credentials, error) { path := filepath.Join(home, ConfigDir, ConfigFile) data, err := os.ReadFile(path) if err != nil { - return nil, fmt.Errorf("you are not logged in, run cre login and try again") + //return nil, fmt.Errorf("you are not logged in, run cre login and try again") + return cfg, nil } if err := yaml.Unmarshal(data, &cfg.Tokens); err != nil { return nil, err } if cfg.Tokens == nil || cfg.Tokens.AccessToken == "" { - return nil, fmt.Errorf("you are not logged in, run cre login and try again") + //return nil, fmt.Errorf("you are not logged in, run cre login and try again") + return cfg, nil } return cfg, nil }