From 47f5f931b5031b97d876815e2fd1a8c7dbcb2480 Mon Sep 17 00:00:00 2001 From: Eugene Rakhmatulin Date: Sat, 28 Mar 2026 14:55:31 -0700 Subject: [PATCH] Allow to specify config file when doing setup --- autodiscover.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autodiscover.sh b/autodiscover.sh index 8cf21e1..58b66c5 100644 --- a/autodiscover.sh +++ b/autodiscover.sh @@ -15,7 +15,8 @@ load_env_if_exists() { fi # Validate config file exists if explicitly specified - if [[ "$config_explicit" == "true" ]] && [[ ! -f "$env_file" ]]; then + # Exception: if --setup is also specified, the file will be created by the setup procedure + if [[ "$config_explicit" == "true" ]] && [[ ! -f "$env_file" ]] && [[ "${FORCE_DISCOVER:-false}" != "true" ]]; then echo "Error: Config file not found: $env_file" exit 1 fi