|
1 | 1 | package cli |
2 | 2 |
|
| 3 | +// nolint:depguard |
3 | 4 | import ( |
4 | 5 | "context" |
5 | 6 | "encoding/json" |
@@ -64,7 +65,7 @@ func ConfigureExportCommand(app *kingpin.Application, a *AwsVault) { |
64 | 65 | HintAction(a.MustGetProfileNames). |
65 | 66 | StringVar(&input.ProfileName) |
66 | 67 |
|
67 | | - cmd.Action(func(c *kingpin.ParseContext) (err error) { |
| 68 | + cmd.Action(func(_ *kingpin.ParseContext) (err error) { |
68 | 69 | input.Config.MfaPromptMethod = a.PromptDriver(false) |
69 | 70 | input.Config.NonChainedGetSessionTokenDuration = input.SessionDuration |
70 | 71 | input.Config.AssumeRoleDuration = input.SessionDuration |
@@ -103,13 +104,17 @@ func ExportCommand(input ExportCommandInput, f *vault.ConfigFile, keyring keyrin |
103 | 104 |
|
104 | 105 | if input.Format == FormatTypeExportJSON { |
105 | 106 | return printJSON(input, credsProvider) |
106 | | - } else if input.Format == FormatTypeExportINI { |
| 107 | + } |
| 108 | + |
| 109 | + if input.Format == FormatTypeExportINI { |
107 | 110 | return printINI(credsProvider, input.ProfileName, config.Region) |
108 | | - } else if input.Format == FormatTypeExportEnv { |
| 111 | + } |
| 112 | + |
| 113 | + if input.Format == FormatTypeExportEnv { |
109 | 114 | return printEnv(input, credsProvider, config.Region, "export ") |
110 | | - } else { |
111 | | - return printEnv(input, credsProvider, config.Region, "") |
112 | 115 | } |
| 116 | + |
| 117 | + return printEnv(input, credsProvider, config.Region, "") |
113 | 118 | } |
114 | 119 |
|
115 | 120 | func printJSON(input ExportCommandInput, credsProvider aws.CredentialsProvider) error { |
|
0 commit comments