Skip to content

Commit f415bf6

Browse files
committed
feat(buildExtensions): syncSupabaseEnvVars to return empty array for dev env
1 parent facb63c commit f415bf6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/build/src/extensions/core/syncSupabaseEnvVars.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ export function syncSupabaseEnvVars(options?: {
9595
envVarPrefix?: string;
9696
}): BuildExtension {
9797
const sync = syncEnvVars(async (ctx) => {
98+
// Skip for development environments
99+
if (ctx.environment === "dev") {
100+
return [];
101+
}
102+
98103
const projectId =
99104
options?.projectId ?? process.env.SUPABASE_PROJECT_ID ?? ctx.env.SUPABASE_PROJECT_ID;
100105
const supabaseAccessToken =
@@ -161,7 +166,7 @@ export function syncSupabaseEnvVars(options?: {
161166
// Step 2: Find the target branch based on environment
162167
let targetBranch: SupabaseBranch | undefined;
163168

164-
if (ctx.environment === "prod" || ctx.environment === "dev") {
169+
if (ctx.environment === "prod") {
165170
targetBranch = branches.find((b) => b.is_default);
166171

167172
if (!targetBranch) {

0 commit comments

Comments
 (0)