From 87d52e09058b67d2238b084e75f93f4513aea124 Mon Sep 17 00:00:00 2001 From: hoelee Date: Thu, 28 May 2026 09:00:00 +0800 Subject: [PATCH] feat(shell-sync): validate_settings() part 1/3 --- platform/shell-sync/sync.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/shell-sync/sync.sh b/platform/shell-sync/sync.sh index 86ef43de..dc35c5e4 100644 --- a/platform/shell-sync/sync.sh +++ b/platform/shell-sync/sync.sh @@ -53,3 +53,9 @@ log_oauth_authorization_guidance() { fi } +validate_settings() { + if ! [[ "$NUM_ACCOUNTS" =~ ^[1-9][0-9]*$ ]]; then + log "Configuration error: NUM_ACCOUNTS must be a positive integer" + return 1 + fi +