Skip to content

Commit 4e9f150

Browse files
committed
fix(cli): warn when build-tuning flags are ignored with --local-bundle
The container build runs on the build server with fixed settings, so local build-tuning flags (--compression, --no-cache, --builder, --network, --push, --load, ...) are parsed but not forwarded. Warn instead of silently dropping them, depot honored these flags, so local-bundle users migrating from depot would otherwise assume they took effect.
1 parent a37fc67 commit 4e9f150

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,26 @@ async function handleNativeBuildServerDeploy({
11361136
let bundleOutputPath: string | undefined;
11371137

11381138
if (options.localBundle) {
1139+
// The container build runs on the build server with its own fixed settings —
1140+
// local build-tuning flags are not forwarded. Be honest about ignoring them.
1141+
const ignoredBuildFlags = [
1142+
options.compression !== "zstd" && "--compression",
1143+
options.cacheCompression !== "zstd" && "--cache-compression",
1144+
options.compressionLevel !== undefined && "--compression-level",
1145+
!options.forceCompression && "--no-force-compression",
1146+
!options.cache && "--no-cache",
1147+
options.builder !== "trigger" && "--builder",
1148+
options.network !== undefined && "--network",
1149+
options.push !== undefined && "--push/--no-push",
1150+
options.load !== undefined && "--load/--no-load",
1151+
].filter((flag): flag is string => Boolean(flag));
1152+
1153+
if (ignoredBuildFlags.length > 0) {
1154+
log.warn(
1155+
`The following flags are ignored with --local-bundle (the image is built remotely): ${ignoredBuildFlags.join(", ")}`
1156+
);
1157+
}
1158+
11391159
const serverEnvVars = await apiClient.getEnvironmentVariables(config.project);
11401160
loadDotEnvVars(config.workingDir, options.envFile);
11411161

0 commit comments

Comments
 (0)