From 0118d8bbbbe5bbf4c5bacc26c27fef07d4aca299 Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Wed, 30 Jul 2025 15:15:31 +0800 Subject: [PATCH] fix: disable ssl when connecting in debug mode --- internal/gen/types/types.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/gen/types/types.go b/internal/gen/types/types.go index 9ffc7dc722..26f3c09bfe 100644 --- a/internal/gen/types/types.go +++ b/internal/gen/types/types.go @@ -12,6 +12,7 @@ import ( "github.com/jackc/pgconn" "github.com/jackc/pgx/v4" "github.com/spf13/afero" + "github.com/spf13/viper" "github.com/supabase/cli/internal/utils" "github.com/supabase/cli/pkg/api" ) @@ -113,5 +114,6 @@ func isRequireSSL(ctx context.Context, dbUrl string, options ...func(*pgx.ConnCo } return false, err } - return true, conn.Close(ctx) + // SSL is not supported in debug mode + return !viper.GetBool("DEBUG"), conn.Close(ctx) }