Skip to content

Commit

Permalink
GODRIVER-3371 Fix aws auth on windows (mongodb-labs#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Oct 3, 2024
1 parent 5ef3435 commit 14e2fa6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .evergreen/auth_aws/aws_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def join(*parts):

def run(args, env):
"""Run a python command in a subprocess."""
env.update(os.environ.copy())
return subprocess.run([sys.executable] + args, env=env).returncode


Expand Down Expand Up @@ -147,6 +148,8 @@ def setup_web_identity():
raise RuntimeError("Failed to unassign an instance profile from the current machine")

token_file = os.environ.get('AWS_WEB_IDENTITY_TOKEN_FILE', CONFIG[get_key('iam_web_identity_token_file')])
if os.name == "nt" and token_file.startswith('/tmp'):
token_file = token_file.replace("/tmp", "C:/cygwin/tmp/")

# Handle the OIDC credentials.
env = dict(
Expand Down

0 comments on commit 14e2fa6

Please sign in to comment.