You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/wrangler/src/r2/domain.ts
+17-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
import{readConfig}from"../config";
2
+
import{confirm}from"../dialogs";
2
3
import{logger}from"../logger";
3
4
import{printWranglerBanner}from"../update-check";
4
5
import{requireAuth}from"../user";
@@ -142,6 +143,12 @@ export function RemoveOptions(yargs: CommonYargsArgv) {
142
143
alias: "J",
143
144
requiresArg: true,
144
145
type: "string",
146
+
})
147
+
.option("force",{
148
+
describe: "Skip confirmation",
149
+
type: "boolean",
150
+
alias: "y",
151
+
default: false,
145
152
});
146
153
}
147
154
@@ -152,8 +159,17 @@ export async function RemoveHandler(
152
159
constconfig=readConfig(args.config,args);
153
160
constaccountId=awaitrequireAuth(config);
154
161
155
-
const{ bucket, domain, jurisdiction }=args;
162
+
const{ bucket, domain, jurisdiction, force}=args;
156
163
164
+
if(!force){
165
+
constconfirmedRemoval=awaitconfirm(
166
+
`Are you sure you want to remove the custom domain '${domain}' from bucket '${bucket}'? Your bucket will no longer be available from 'https://${domain}'`
167
+
);
168
+
if(!confirmedRemoval){
169
+
logger.log("Removal cancelled.");
170
+
return;
171
+
}
172
+
}
157
173
logger.log(`Removing custom domain '${domain}' from bucket '${bucket}'...`);
0 commit comments