Skip to content

Commit

Permalink
Issue #196: display error message
Browse files Browse the repository at this point in the history
  • Loading branch information
simcap committed Mar 26, 2018
1 parent 9c220cd commit 9fba342
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions commands/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func applyRegionAndProfilePrecedence() error {
regionOverridenThrough = ""
}
} else {
return err
fmt.Fprintln(os.Stderr, err)
}

if awsRegionGlobalFlag != "" {
Expand Down Expand Up @@ -247,8 +247,11 @@ func hasEmbeddedRegionInSharedConfigForProfile(profile string) (string, bool, er
SharedConfigState: session.SharedConfigEnable,
Profile: profile,
})
if err != nil {
return "", false, fmt.Errorf("cannot check profile '%s' has embedded region in shared config file: %s", profile, err)
}
region := *s.Config.Region
return region, len(region) > 0, err
return region, len(region) > 0, nil
}

func isNotAwlessFormerDefaultAMI(s string) bool {
Expand Down

0 comments on commit 9fba342

Please sign in to comment.