1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-20 09:19:36 +01:00

libstore: Put all the AWS credentials logic behind interface class AwsCredentialProvider

This makes it so we don't need to rely on global variables and hacky destructors to
clean up another global variable. Just putting it in the correct order in the class
is more than enough.
This commit is contained in:
Sergei Zimmerman 2025-10-16 21:13:04 +03:00
parent b1d067c9bb
commit dc03c6a812
No known key found for this signature in database
4 changed files with 69 additions and 89 deletions

View file

@ -958,7 +958,7 @@ std::optional<AwsCredentials> DerivationBuilderImpl::preResolveAwsCredentials()
auto s3Url = ParsedS3URL::parse(parsedUrl);
// Use the preResolveAwsCredentials from aws-creds
auto credentials = nix::preResolveAwsCredentials(s3Url);
auto credentials = getAwsCredentialsProvider()->getCredentials(s3Url);
debug("Successfully pre-resolved AWS credentials in parent process");
return credentials;
}