convert more execSync to async
This commit is contained in:
@@ -144,8 +144,7 @@ async function exportToFile(file) {
|
||||
assert.strictEqual(typeof file, 'string');
|
||||
|
||||
// latest mysqldump enables column stats by default which is not present in 5.7 util
|
||||
const mysqlDumpHelp = safe.child_process.execSync('/usr/bin/mysqldump --help', { encoding: 'utf8' });
|
||||
if (!mysqlDumpHelp) throw new BoxError(BoxError.DATABASE_ERROR, safe.error);
|
||||
const mysqlDumpHelp = await shell.promises.exec('exportToFile', '/usr/bin/mysqldump --help', { encoding: 'utf8' });
|
||||
const hasColStats = mysqlDumpHelp.includes('column-statistics');
|
||||
const colStats = hasColStats ? '--column-statistics=0' : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user