mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 18:16:52 +00:00
Merge pull request #333 from rpdelaney/fix/aws-credentials-docs
Fix/aws credentials docs
This commit is contained in:
commit
2dbaced650
2 changed files with 9 additions and 7 deletions
|
|
@ -58,9 +58,11 @@ Add this to your `.pre-commit-config.yaml`
|
|||
- `detect-aws-credentials` - Checks for the existence of AWS secrets that you
|
||||
have set up with the AWS CLI.
|
||||
The following arguments are available:
|
||||
- `--credentials-file` - additional AWS CLI style configuration file in a
|
||||
non-standard location to fetch configured credentials from. Can be repeated
|
||||
multiple times.
|
||||
- `--credentials-file CREDENTIALS_FILE` - additional AWS CLI style
|
||||
configuration file in a non-standard location to fetch configured
|
||||
credentials from. Can be repeated multiple times.
|
||||
- `--allow-missing-credentials` - Allow hook to pass when no credentials are
|
||||
detected.
|
||||
- `detect-private-key` - Checks for the existence of private keys.
|
||||
- `double-quote-string-fixer` - This hook replaces double quoted strings
|
||||
with single quoted strings.
|
||||
|
|
|
|||
|
|
@ -87,14 +87,14 @@ def main(argv=None):
|
|||
parser.add_argument('filenames', nargs='+', help='Filenames to run')
|
||||
parser.add_argument(
|
||||
'--credentials-file',
|
||||
dest='credential_files',
|
||||
dest='credentials_file',
|
||||
action='append',
|
||||
default=[
|
||||
'~/.aws/config', '~/.aws/credentials', '/etc/boto.cfg', '~/.boto',
|
||||
],
|
||||
help=(
|
||||
'Location of additional AWS credential files from which to get '
|
||||
'secret keys from'
|
||||
'Location of additional AWS credential file from which to get '
|
||||
'secret keys. Can be passed multiple times.'
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
|
|
@ -105,7 +105,7 @@ def main(argv=None):
|
|||
)
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
credential_files = set(args.credential_files)
|
||||
credential_files = set(args.credentials_file)
|
||||
|
||||
# Add the credentials files configured via environment variables to the set
|
||||
# of files to to gather AWS secrets from.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue