diff --git a/cmd/export.go b/cmd/export.go index 88774cb..c017eb3 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -24,12 +24,15 @@ func export(cmd *cobra.Command, args []string) error { return errors.New("PROFILE required") } - creds, err := credentials.Get(args[0], quiet) + profileName := args[0] + + creds, err := credentials.Get(profileName, quiet) if err != nil { return err } + fmt.Printf("export AWS_PROFILE='%s'\n", profileName) fmt.Printf("export AWS_ACCESS_KEY_ID='%s'\n", creds.AccessKeyID) fmt.Printf("export AWS_SECRET_ACCESS_KEY='%s'\n", creds.SecretAccessKey) fmt.Printf("export AWS_SESSION_TOKEN='%s'\n", creds.SessionToken)