File tree Expand file tree Collapse file tree
packages/cli-v3/src/commands Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments