update setup.py

fix: raise error if SUPABASE_URL is missing from env or .env
This commit is contained in:
Chetan Pawar 2025-06-21 21:14:17 +05:30
parent 5b2c04ed87
commit 5006305067
1 changed files with 4 additions and 0 deletions

View File

@ -615,6 +615,10 @@ def setup_supabase():
supabase_url = line.strip().split('=', 1)[1] supabase_url = line.strip().split('=', 1)[1]
break break
# Add this check
if not supabase_url:
raise RuntimeError("SUPABASE_URL not found in environment or backend/.env file.")
project_ref = None project_ref = None
if supabase_url: if supabase_url:
# Extract project reference from URL (format: https://[project_ref].supabase.co) # Extract project reference from URL (format: https://[project_ref].supabase.co)