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:
parent
b1d067c9bb
commit
dc03c6a812
4 changed files with 69 additions and 89 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue