Skip to content

Commit e9886f4

Browse files
remote --force flag
1 parent f56c2fa commit e9886f4

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

packages/wrangler/src/__tests__/deploy.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13165,7 +13165,7 @@ export default{
1316513165
`);
1316613166

1316713167
expect(std.err).toMatchInlineSnapshot(`
13168-
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mAborting the deployment operation (due to strict mode, to prevent this failure either remove the \`--strict\` flag or add the \`--force\` one)[0m
13168+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mAborting the deployment operation (due to strict mode, to prevent this failure either remove the \`--strict\` flag)[0m
1316913169
1317013170
"
1317113171
`);
@@ -13193,7 +13193,7 @@ export default{
1319313193
"
1319413194
`);
1319513195
expect(std.err).toMatchInlineSnapshot(`
13196-
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mAborting the deployment operation (due to strict mode, to prevent this failure either remove the \`--strict\` flag or add the \`--force\` one)[0m
13196+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mAborting the deployment operation (due to strict mode, to prevent this failure either remove the \`--strict\` flag)[0m
1319713197
1319813198
"
1319913199
`);

packages/wrangler/src/deploy/deploy.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ type Props = {
117117
metafile: string | boolean | undefined;
118118
containersRollout: "immediate" | "gradual" | undefined;
119119
strict: boolean | undefined;
120-
force: boolean | undefined;
121120
};
122121

123122
export type RouteObject = ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
@@ -355,7 +354,7 @@ export default async function deploy(props: Props): Promise<{
355354
workerTag: string | null;
356355
targets?: string[];
357356
}> {
358-
const deployConfirm = getDeployConfirmFunction(props.strict && !props.force);
357+
const deployConfirm = getDeployConfirmFunction(props.strict);
359358

360359
// TODO: warn if git/hg has uncommitted changes
361360
const { config, accountId, name, entry } = props;
@@ -1410,7 +1409,7 @@ function getDeployConfirmFunction(
14101409
if (nonInteractive && strictMode) {
14111410
return () => {
14121411
logger.error(
1413-
"Aborting the deployment operation (due to strict mode, to prevent this failure either remove the `--strict` flag or add the `--force` one)"
1412+
"Aborting the deployment operation (due to strict mode, to prevent this failure either remove the `--strict` flag)"
14141413
);
14151414
process.exitCode = 1;
14161415
return Promise.resolve(false);

packages/wrangler/src/deploy/index.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,6 @@ export const deployCommand = createCommand({
243243
type: "boolean",
244244
default: false,
245245
},
246-
// TODO: check, if `--force` really necessary? users can just provide or not `--strict`, no?
247-
force: {
248-
describe:
249-
"This flag can be used to disable strict mode (if set via `--strict`).",
250-
type: "boolean",
251-
default: false,
252-
},
253246
},
254247
behaviour: {
255248
useConfigRedirectIfAvailable: true,
@@ -396,7 +389,6 @@ export const deployCommand = createCommand({
396389
experimentalAutoCreate: args.experimentalAutoCreate,
397390
containersRollout: args.containersRollout,
398391
strict: args.strict,
399-
force: args.force,
400392
});
401393

402394
writeOutput({

0 commit comments

Comments
 (0)