fix(cli): nocobase test command --db-clean option is invalid

This commit is contained in:
chenos 2022-05-22 21:38:15 +08:00
parent 80a685f8bf
commit e031e2e6c1

View File

@ -14,7 +14,15 @@ module.exports = (cli) => {
nodeCheck(); nodeCheck();
if (options.dbClean) { if (options.dbClean) {
promptForTs(); promptForTs();
await runAppCommand('db:clean', '-y'); await runAppCommand('db:clean', ['-y']);
}
let index = process.argv.indexOf('-c');
if (index > 0) {
process.argv.splice(index, 1);
}
index = process.argv.indexOf('--db-clean');
if (index > 0) {
process.argv.splice(index, 1);
} }
process.argv.splice(2, 1, '-i'); process.argv.splice(2, 1, '-i');
require('jest-cli/bin/jest'); require('jest-cli/bin/jest');