balena-io-modules / open-balena-base

17 stars 12 forks source link

don't clobber existing values #317

Closed ab77 closed 1 year ago

ab77 commented 1 year ago
REGISTRY2_S3_SECRET=""

TOKENS_CONFIG=IMG_S3_SECRET_KEY:hex,S3_MINIO_SECRET_KEY:IMG_S3_SECRET_KEY,S3_MINIO_SECRET_KEY:REGISTRY2_S3_SECRET

API_KEYS[IMG_S3_SECRET_KEY]=<random hex value>
API_KEYS[S3_MINIO_SECRET_KEY]=API_KEYS[IMG_S3_SECRET_KEY]

.. and since REGISTRY2_S3_SECRET is undefined:
API_KEYS[S3_MINIO_SECRET_KEY] is untouched and still contains the value of API_KEYS[IMG_S3_SECRET_KEY]

change-type: patch

ab77 commented 1 year ago

lgtm