Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()]
Expand Down
6 changes: 4 additions & 2 deletions internal/credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Loading