Skip to content

Commit 2dbaced

Browse files
authored
Merge pull request #333 from rpdelaney/fix/aws-credentials-docs
Fix/aws credentials docs
2 parents 86bfe8c + 0d83fed commit 2dbaced

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ Add this to your `.pre-commit-config.yaml`
5858
- `detect-aws-credentials` - Checks for the existence of AWS secrets that you
5959
have set up with the AWS CLI.
6060
The following arguments are available:
61-
- `--credentials-file` - additional AWS CLI style configuration file in a
62-
non-standard location to fetch configured credentials from. Can be repeated
63-
multiple times.
61+
- `--credentials-file CREDENTIALS_FILE` - additional AWS CLI style
62+
configuration file in a non-standard location to fetch configured
63+
credentials from. Can be repeated multiple times.
64+
- `--allow-missing-credentials` - Allow hook to pass when no credentials are
65+
detected.
6466
- `detect-private-key` - Checks for the existence of private keys.
6567
- `double-quote-string-fixer` - This hook replaces double quoted strings
6668
with single quoted strings.

pre_commit_hooks/detect_aws_credentials.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ def main(argv=None):
8787
parser.add_argument('filenames', nargs='+', help='Filenames to run')
8888
parser.add_argument(
8989
'--credentials-file',
90-
dest='credential_files',
90+
dest='credentials_file',
9191
action='append',
9292
default=[
9393
'~/.aws/config', '~/.aws/credentials', '/etc/boto.cfg', '~/.boto',
9494
],
9595
help=(
96-
'Location of additional AWS credential files from which to get '
97-
'secret keys from'
96+
'Location of additional AWS credential file from which to get '
97+
'secret keys. Can be passed multiple times.'
9898
),
9999
)
100100
parser.add_argument(
@@ -105,7 +105,7 @@ def main(argv=None):
105105
)
106106
args = parser.parse_args(argv)
107107

108-
credential_files = set(args.credential_files)
108+
credential_files = set(args.credentials_file)
109109

110110
# Add the credentials files configured via environment variables to the set
111111
# of files to to gather AWS secrets from.

0 commit comments

Comments
 (0)