@@ -146,7 +146,8 @@ export const secret = (secretYargs: CommonYargsArgv) => {
146
146
const config = readConfig ( args . config , args ) ;
147
147
if ( config . pages_build_output_dir ) {
148
148
throw new UserError (
149
- "This command is for Workers, for Pages please run `wrangler pages secret put`."
149
+ "It looks like you've run a Workers-specific command in a Pages project.\n" +
150
+ "For Pages, please run `wrangler pages secret put` instead."
150
151
) ;
151
152
}
152
153
@@ -250,7 +251,8 @@ export const secret = (secretYargs: CommonYargsArgv) => {
250
251
const config = readConfig ( args . config , args ) ;
251
252
if ( config . pages_build_output_dir ) {
252
253
throw new UserError (
253
- "This command is for Workers, for Pages please run `wrangler pages secret delete`."
254
+ "It looks like you've run a Workers-specific command in a Pages project.\n" +
255
+ "For Pages, please run `wrangler pages secret delete` instead."
254
256
) ;
255
257
}
256
258
@@ -311,7 +313,8 @@ export const secret = (secretYargs: CommonYargsArgv) => {
311
313
const config = readConfig ( args . config , args ) ;
312
314
if ( config . pages_build_output_dir ) {
313
315
throw new UserError (
314
- "This command is for Workers, for Pages please run `wrangler pages secret list`."
316
+ "It looks like you've run a Workers-specific command in a Pages project.\n" +
317
+ "For Pages, please run `wrangler pages secret list` instead."
315
318
) ;
316
319
}
317
320
@@ -377,7 +380,8 @@ export const secretBulkHandler = async (secretBulkArgs: SecretBulkArgs) => {
377
380
const config = readConfig ( secretBulkArgs . config , secretBulkArgs ) ;
378
381
if ( config . pages_build_output_dir ) {
379
382
throw new UserError (
380
- "This command is for Workers, for Pages please run `wrangler pages secret bulk`."
383
+ "It looks like you've run a Workers-specific command in a Pages project.\n" +
384
+ "For Pages, please run `wrangler pages secret bulk` instead."
381
385
) ;
382
386
}
383
387
0 commit comments