From 8d5021e7da9d4ba0d92630221f5e6e63e5b204b7 Mon Sep 17 00:00:00 2001 From: Gabriele Fedi Date: Thu, 4 Jan 2024 15:44:02 +0100 Subject: [PATCH 1/2] fix: unset default profile value The profile, if not passed, should be retrieved from the environment and not be enforced as "default" Signed-off-by: Gabriele Fedi --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 6879729..35d0774 100644 --- a/main.go +++ b/main.go @@ -220,7 +220,7 @@ func encrypt() cli.Command { }, cli.StringFlag{ Name: "profile", - Value: aws.DefaultProfile, + Value: "", Usage: "the AWS API credentials profile", Destination: &awsProfile, }, @@ -458,7 +458,7 @@ func decrypt() cli.Command { }, cli.StringFlag{ Name: "profile", - Value: aws.DefaultProfile, + Value: "", Usage: "the AWS API credentials profile", Destination: &awsProfile, }, From 97e4f6d9ec74af8385f0e6a274fbfc073de181f5 Mon Sep 17 00:00:00 2001 From: Gabriele Fedi Date: Tue, 9 Jan 2024 17:19:34 +0100 Subject: [PATCH 2/2] test: remove required profile from aws Signed-off-by: Gabriele Fedi --- aws/aws_integration_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/aws_integration_test.go b/aws/aws_integration_test.go index 122a2c5..f66f53d 100644 --- a/aws/aws_integration_test.go +++ b/aws/aws_integration_test.go @@ -25,7 +25,6 @@ func TestEncryptDecryptWithAWS(t *testing.T) { profile := os.Getenv("AWS_PROFILE") require.NotEmpty(t, key) require.NotEmpty(t, region) - require.NotEmpty(t, profile) crypt := crypto.New(New(key, region, profile))