Skip to content

Commit a1ce2e7

Browse files
authored
fix: disable ssl when connecting in debug mode (#3947)
1 parent 8d331e2 commit a1ce2e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/gen/types/types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/jackc/pgconn"
1313
"github.com/jackc/pgx/v4"
1414
"github.com/spf13/afero"
15+
"github.com/spf13/viper"
1516
"github.com/supabase/cli/internal/utils"
1617
"github.com/supabase/cli/pkg/api"
1718
)
@@ -113,5 +114,6 @@ func isRequireSSL(ctx context.Context, dbUrl string, options ...func(*pgx.ConnCo
113114
}
114115
return false, err
115116
}
116-
return true, conn.Close(ctx)
117+
// SSL is not supported in debug mode
118+
return !viper.GetBool("DEBUG"), conn.Close(ctx)
117119
}

0 commit comments

Comments
 (0)