fix: unhandled promise rejection error on reset error

Also, removed buildAll() on reset.
This commit is contained in:
Julian Lam
2019-11-20 13:45:29 -05:00
parent 366ad5cd69
commit 510737726c

View File

@@ -84,12 +84,11 @@ exports.reset = async function (options) {
/* eslint-disable no-await-in-loop */ /* eslint-disable no-await-in-loop */
await task(); await task();
} }
winston.info('[reset] Reset complete'); winston.info('[reset] Reset complete. Please run `./nodebb build` to rebuild assets.');
await require('../meta/build').buildAll();
process.exit(0); process.exit(0);
} catch (err) { } catch (err) {
winston.error('[reset] Errors were encountered during reset -- ' + err.message); winston.error('[reset] Errors were encountered during reset -- ' + err.message);
throw err; process.exit(1);
} }
}; };