confirm sqldrop
This commit is contained in:
parent
0f5ac18479
commit
ed7bef48ec
2 changed files with 13 additions and 9 deletions
|
@ -29,11 +29,15 @@ function createDump(callback) {
|
|||
});
|
||||
}
|
||||
|
||||
createDump(err => {
|
||||
if (err) {
|
||||
log.error('sqldrop', err);
|
||||
process.exit(1);
|
||||
}
|
||||
log.info('sqldrop', 'Command completed, all tables dropped from "%s"', config.mysql.database);
|
||||
process.exit(0);
|
||||
});
|
||||
if (process.env.CONFIRM === 'Y') {
|
||||
createDump(err => {
|
||||
if (err) {
|
||||
log.error('sqldrop', err);
|
||||
process.exit(1);
|
||||
}
|
||||
log.info('sqldrop', 'Command completed, all tables dropped from "%s"', config.mysql.database);
|
||||
process.exit(0);
|
||||
});
|
||||
} else {
|
||||
log.error('sqldrop', 'Run command as "CONFIRM=Y npm run sqldrop"');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue