This commit is contained in:
Geoff Bourne 2024-05-05 20:50:03 +01:00 committed by GitHub
commit 8531f23c1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 3 deletions

View File

@ -77,13 +77,20 @@ if [[ -v WHITELIST_FILE ]]; then
fi
if [[ -v WHITELIST ]]; then
args=()
if isTrue "${APPEND_WHITELIST:-false}" || isFalse "${OVERRIDE_WHITELIST:-true}"; then
args+=(--append-only)
fi
existing="$EXISTING_WHITELIST_FILE"
# Working with an OPS list, so normalize the value to a "non-file" mode
if [[ "$EXISTING_WHITELIST_FILE" = SYNC_FILE_MERGE_LIST ]]; then
existing=MERGE
fi
# legacy option
if [[ -v APPEND_WHITELIST ]] && isTrue "${APPEND_WHITELIST}"; then
existing=MERGE
fi
# legacy option
if [[ -v OVERRIDE_WHITELIST ]] && isFalse "${OVERRIDE_WHITELIST}"; then
existing=SKIP
fi
# shellcheck disable=SC2086
mc-image-helper manage-users \
"${sharedArgs[@]}" "${args[@]}" \