From ffe443b4e991b734ad46b2c5aa2a170300c6fffe Mon Sep 17 00:00:00 2001 From: chareice Date: Mon, 4 Sep 2023 10:36:24 +0800 Subject: [PATCH] fix: clean command on windows --- packages/core/cli/src/commands/clean.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/core/cli/src/commands/clean.js b/packages/core/cli/src/commands/clean.js index 36615c4eb..529e9ccbd 100644 --- a/packages/core/cli/src/commands/clean.js +++ b/packages/core/cli/src/commands/clean.js @@ -10,12 +10,11 @@ module.exports = (cli) => { cli .command('clean') .allowUnknownOption() - .action(() => { + .action(async () => { if (!isDev()) { return; } - run('rimraf', ['-rf', './storage/app-dev']); - run('rimraf', ['-rf', './**/{.umi,.umi-production}']); - run('rimraf', ['-rf', 'packages/*/*/{lib,esm,es,dist,node_modules}']); + await run('rimraf', ['-rf', './storage/app-dev']); + await run('rimraf', ['-rf', 'packages/*/*/{lib,esm,es,dist,node_modules}']); }); };