mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: unhandled promise rejection error on reset error
Also, removed buildAll() on reset.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user