Skip to content

Commit

Permalink
don't warn if okta.yaml doesn't exist
Browse files Browse the repository at this point in the history
Closes #226
  • Loading branch information
monde committed Aug 28, 2024
1 parent e854582 commit cbe5d29
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/root/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package web

import (
"io/fs"

"github.com/spf13/cobra"

"github.com/okta/okta-aws-cli/internal/config"
Expand Down Expand Up @@ -87,7 +89,10 @@ func NewWebCommand() *cobra.Command {
// Warn if there is an issue with okta.yaml
_, err = config.OktaConfig()
if err != nil {
webssoauth.ConsolePrint(cfg, "WARNING: issue with %s file. Run `okta-aws-cli debug` command for additional diagnosis.\nError: %+v\n", config.OktaYaml, err)
if _, pathError := err.(*fs.PathError); !pathError {
webssoauth.ConsolePrint(cfg, "WARNING: issue with %s file. Run `okta-aws-cli debug` command for additional diagnosis.\nError: %+v\n", config.OktaYaml, err)

}
}

err = cliFlag.CheckRequiredFlags(requiredFlags)
Expand Down

0 comments on commit cbe5d29

Please sign in to comment.