Browse Source

fix: asynchronous mkdirp calls

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5031/head
mertmit 2 years ago
parent
commit
56586188af
  1. 2
      packages/nocodb/src/lib/Noco.ts
  2. 2
      packages/nocodb/src/lib/db/sql-client/lib/KnexClient.ts
  3. 2
      packages/nocodb/src/lib/db/sql-client/lib/mysql/MysqlClient.ts
  4. 2
      packages/nocodb/src/lib/meta/NcMetaMgr.ts

2
packages/nocodb/src/lib/Noco.ts

@ -180,7 +180,7 @@ export default class Noco {
log('Initializing app'); log('Initializing app');
// create tool directory if missing // create tool directory if missing
mkdirp.sync(this.config.toolDir); await mkdirp(this.config.toolDir);
this.initSentry(); this.initSentry();
NocoCache.init(); NocoCache.init();

2
packages/nocodb/src/lib/db/sql-client/lib/KnexClient.ts

@ -2838,7 +2838,7 @@ class KnexClient extends SqlClient {
console.log('in knex SeedInit'); console.log('in knex SeedInit');
try { try {
mkdirp.sync(args.seedsFolder); await mkdirp(args.seedsFolder);
} catch (e) { } catch (e) {
log.ppe(e, _func); log.ppe(e, _func);
throw e; throw e;

2
packages/nocodb/src/lib/db/sql-client/lib/mysql/MysqlClient.ts

@ -1930,7 +1930,7 @@ class MysqlClient extends KnexClient {
console.log('in mysql SeedInit'); console.log('in mysql SeedInit');
try { try {
mkdirp.sync(args.seedsFolder); await mkdirp(args.seedsFolder);
const seedSettings = path.join(args.seedsFolder, '__xseeds.json'); const seedSettings = path.join(args.seedsFolder, '__xseeds.json');
await promisify(jsonfile.writeFile)( await promisify(jsonfile.writeFile)(

2
packages/nocodb/src/lib/meta/NcMetaMgr.ts

@ -702,7 +702,7 @@ export default class NcMetaMgr {
'meta' 'meta'
); );
mkdirp.sync(metaFolder); await mkdirp(metaFolder);
// const client = await this.projectGetSqlClient(args); // const client = await this.projectGetSqlClient(args);
const dbAlias = this.getDbAlias(args); const dbAlias = this.getDbAlias(args);

Loading…
Cancel
Save