Skip to content

Commit 2fb25d7

Browse files
committed
AWS SAM: Skip auth on docs, init, local & validate subcommands
1 parent 891e413 commit 2fb25d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/aws/sam.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ func AWSSAMCLI() schema.Executable {
1515
NeedsAuth: needsauth.IfAll(
1616
needsauth.NotForHelpOrVersion(),
1717
needsauth.NotWithoutArgs(),
18+
// skip 1Password authentication for "sam docs", "sam init", "sam local" and "sam validate" and their subcommands
19+
needsauth.NotWhenContainsArgs("docs"),
20+
needsauth.NotWhenContainsArgs("init"),
21+
needsauth.NotWhenContainsArgs("local"),
22+
needsauth.NotWhenContainsArgs("validate"),
1823
),
1924
Uses: []schema.CredentialUsage{
2025
{

0 commit comments

Comments
 (0)