fix(config): Detected S3 credentials now works

detected-s3-creds: Previously it was using a logical OR to check whether the `STORE_ACCESS_KEY` and `STORE_SECRET_KEY` were required (i.e. either the credentials are not detected OR the credentials were not already configured), but now uses a logical AND instead.
This commit is contained in:
tecc 2022-11-18 17:19:49 +01:00
parent 6fc2f7d40d
commit 2431c96409
No known key found for this signature in database
GPG Key ID: 400AAD881FCC028B

View File

@ -106,11 +106,11 @@ export function loadConfig() {
store.detectCredentials ??= true;
store.accessKey = env.getEnvRaw(
'STORE_ACCESS_KEY',
!store.detectCredentials || !store.accessKey
!store.detectCredentials && !store.accessKey
) ?? store.accessKey;
store.secretKey = env.getEnvRaw(
'STORE_SECRET_KEY',
!store.detectCredentials || !store.secretKey
!store.detectCredentials && !store.secretKey
) ?? store.secretKey;
store.bucket = env.getEnvRaw(
'STORE_BUCKET',