mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 03:26:53 +00:00
Add AWS_CONFIG_FILE to the environment variables
Turns out there is an additional environment variable AWS_CONFIG_FILE, which gets evaluated for finding configuration files as well. This commit adds support for it.
This commit is contained in:
parent
b0d4cdb1ee
commit
0fd09bf67a
2 changed files with 5 additions and 3 deletions
|
|
@ -10,8 +10,8 @@ from six.moves import configparser
|
|||
def get_aws_credential_files_from_env():
|
||||
"""Extract credential file paths from environment variables."""
|
||||
files = set()
|
||||
for env_var in {'AWS_CREDENTIAL_FILE', 'AWS_SHARED_CREDENTIALS_FILE',
|
||||
'BOTO_CONFIG'}:
|
||||
for env_var in {'AWS_CONFIG_FILE', 'AWS_CREDENTIAL_FILE',
|
||||
'AWS_SHARED_CREDENTIALS_FILE', 'BOTO_CONFIG'}:
|
||||
try:
|
||||
files.add(os.environ[env_var])
|
||||
except KeyError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue