Skip to content

Commit

Permalink
Merge pull request #232 from okta/warn_on_okta_yaml_format_only
Browse files Browse the repository at this point in the history
don't warn if okta.yaml doesn't exist
  • Loading branch information
monde authored Aug 28, 2024
2 parents 4b3b8fe + cbe5d29 commit 2ed765c
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 2ed765c

Please sign in to comment.