Skip to content

Commit 8723671

Browse files
remote --force flag
1 parent 5fbc3a5 commit 8723671

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
@@ -14074,7 +14074,7 @@ export default{
1407414074
`);
1407514075

1407614076
expect(std.err).toMatchInlineSnapshot(`
14077-
"[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
14077+
"[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
1407814078
1407914079
"
1408014080
`);
@@ -14102,7 +14102,7 @@ export default{
1410214102
"
1410314103
`);
1410414104
expect(std.err).toMatchInlineSnapshot(`
14105-
"[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
14105+
"[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
1410614106
1410714107
"
1410814108
`);

packages/wrangler/src/deploy/deploy.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ type Props = {
122122
metafile: string | boolean | undefined;
123123
containersRollout: "immediate" | "gradual" | undefined;
124124
strict: boolean | undefined;
125-
force: boolean | undefined;
126125
};
127126

128127
export type RouteObject = ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
@@ -360,7 +359,7 @@ export default async function deploy(props: Props): Promise<{
360359
workerTag: string | null;
361360
targets?: string[];
362361
}> {
363-
const deployConfirm = getDeployConfirmFunction(props.strict && !props.force);
362+
const deployConfirm = getDeployConfirmFunction(props.strict);
364363

365364
// TODO: warn if git/hg has uncommitted changes
366365
const { config, accountId, name, entry } = props;
@@ -1444,7 +1443,7 @@ function getDeployConfirmFunction(
14441443
if (nonInteractive && strictMode) {
14451444
return () => {
14461445
logger.error(
1447-
"Aborting the deployment operation (due to strict mode, to prevent this failure either remove the `--strict` flag or add the `--force` one)"
1446+
"Aborting the deployment operation (due to strict mode, to prevent this failure either remove the `--strict` flag)"
14481447
);
14491448
process.exitCode = 1;
14501449
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)