You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/root.go
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ import (
5
5
"os"
6
6
7
7
"github.com/dnitsch/aws-cli-auth/internal/config"
8
+
"github.com/dnitsch/aws-cli-auth/internal/util"
8
9
"github.com/spf13/cobra"
9
10
"github.com/spf13/viper"
10
11
)
@@ -14,6 +15,7 @@ var (
14
15
cfgFilestring
15
16
storeInProfilebool
16
17
killHangingProcessbool
18
+
verbosebool
17
19
rootCmd=&cobra.Command{
18
20
Use: "aws-cli-auth",
19
21
Short: "CLI tool for retrieving AWS temporary credentials",
@@ -25,7 +27,7 @@ Stores them under the $HOME/.aws/credentials file under a specified path or retu
25
27
26
28
funcExecute() {
27
29
iferr:=rootCmd.Execute(); err!=nil {
28
-
fmt.Errorf(err.Error())
30
+
util.Exit(err)
29
31
}
30
32
}
31
33
@@ -34,7 +36,7 @@ func init() {
34
36
rootCmd.PersistentFlags().StringVarP(&role, "role", "r", "", "Set the role you want to assume when SAML or OIDC process completes")
35
37
rootCmd.PersistentFlags().StringVarP(&cfgSectionName, "cfg-section", "", "", "config section name in the yaml config file")
36
38
rootCmd.PersistentFlags().BoolVarP(&storeInProfile, "store-profile", "s", false, "By default the credentials are returned to stdout to be used by the credential_process. Set this flag to instead store the credentials under a named profile section")
37
-
// rootCmd.PersistentFlags().BoolVarP(&killHangingProcess, "kill-rod", "k", false, "If aws-cli-auth exited improprely in a previous run there is a chance that there could be hanging processes left over - this will clean them up forcefully")
0 commit comments