Skip to content

Commit 0706c79

Browse files
committed
fix(cli): review nits for the isolated bundle paths
Restore the skip-sync notice in local-bundle deploys and filter undefined build env values on the from-bundle fresh-init fallback.
1 parent c16bbcb commit 0706c79

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

packages/cli-v3/src/commands/deploy.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1805,6 +1805,10 @@ async function handleLocalBundleDeploy({
18051805

18061806
logger.debug("Synced env vars with the server");
18071807
}
1808+
} else if (Object.keys(buildManifest.deploy.sync?.env ?? {}).length > 0) {
1809+
logger.log(
1810+
"Skipping syncing env vars. The environment variables in your project have changed, but the --skip-sync-env-vars flag was provided."
1811+
);
18081812
}
18091813

18101814
const $deploymentSpinner = spinner();
@@ -2614,7 +2618,12 @@ async function handleFromBundleDeploy({
26142618

26152619
buildEnvVars = buildEnvVarsResult.data.variables;
26162620
} else if (bundleManifest.build.env && Object.keys(bundleManifest.build.env).length > 0) {
2617-
buildEnvVars = bundleManifest.build.env;
2621+
// Extensions can set undefined values at runtime despite the manifest type
2622+
buildEnvVars = Object.fromEntries(
2623+
Object.entries(bundleManifest.build.env).filter(
2624+
(entry): entry is [string, string] => typeof entry[1] === "string"
2625+
)
2626+
);
26182627
}
26192628

26202629
if (!existingDeploymentId) {

0 commit comments

Comments
 (0)