@@ -267,28 +267,7 @@ export async function runInRepo(options: RunOptions & RepoOptions) {
267
267
)
268
268
}
269
269
270
- const agent = options . agent
271
- const beforeInstallCommand = toCommand ( beforeInstall , agent )
272
- const beforeBuildCommand = toCommand ( beforeBuild , agent )
273
- const beforeTestCommand = toCommand ( beforeTest , agent )
274
- const buildCommand = toCommand ( build , agent )
275
- const testCommand = toCommand ( test , agent )
276
-
277
- const pkgFile = path . join ( dir , 'package.json' )
278
- const pkg = JSON . parse ( await fs . promises . readFile ( pkgFile , 'utf-8' ) )
279
-
280
- await beforeInstallCommand ?.( pkg . scripts )
281
-
282
- if ( verify && test ) {
283
- const frozenInstall = getCommand ( agent , 'frozen' )
284
- await $ `${ frozenInstall } `
285
- await beforeBuildCommand ?.( pkg . scripts )
286
- await buildCommand ?.( pkg . scripts )
287
- await beforeTestCommand ?.( pkg . scripts )
288
- await testCommand ?.( pkg . scripts )
289
- }
290
270
const overrides = options . overrides || { }
291
-
292
271
const vuePackages = await getVuePackages ( )
293
272
294
273
if ( options . release ) {
@@ -326,8 +305,28 @@ export async function runInRepo(options: RunOptions & RepoOptions) {
326
305
}
327
306
}
328
307
329
- await applyPackageOverrides ( dir , pkg , overrides )
308
+ const agent = options . agent
309
+ const beforeInstallCommand = toCommand ( beforeInstall , agent )
310
+ const beforeBuildCommand = toCommand ( beforeBuild , agent )
311
+ const beforeTestCommand = toCommand ( beforeTest , agent )
312
+ const buildCommand = toCommand ( build , agent )
313
+ const testCommand = toCommand ( test , agent )
314
+
315
+ const pkgFile = path . join ( dir , 'package.json' )
316
+ const pkg = JSON . parse ( await fs . promises . readFile ( pkgFile , 'utf-8' ) )
317
+
318
+ await beforeInstallCommand ?.( pkg . scripts )
330
319
320
+ if ( verify && test ) {
321
+ const frozenInstall = getCommand ( agent , 'frozen' )
322
+ await $ `${ frozenInstall } `
323
+ await beforeBuildCommand ?.( pkg . scripts )
324
+ await buildCommand ?.( pkg . scripts )
325
+ await beforeTestCommand ?.( pkg . scripts )
326
+ await testCommand ?.( pkg . scripts )
327
+ }
328
+
329
+ await applyPackageOverrides ( dir , pkg , overrides )
331
330
await beforeBuildCommand ?.( pkg . scripts )
332
331
await buildCommand ?.( pkg . scripts )
333
332
if ( test ) {
0 commit comments