mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
checkPlugin: cd to Etherpad root dir
This commit is contained in:
parent
5a66abae8b
commit
d9044537bb
1 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,8 @@
|
||||||
* node src/bin/plugins/checkPlugin.js ep_whatever autopush
|
* node src/bin/plugins/checkPlugin.js ep_whatever autopush
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const process = require('process');
|
||||||
|
|
||||||
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
|
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
|
||||||
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
|
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
|
||||||
process.on('unhandledRejection', (err) => { throw err; });
|
process.on('unhandledRejection', (err) => { throw err; });
|
||||||
|
@ -30,6 +32,10 @@ const path = require('path');
|
||||||
|
|
||||||
console.log(`Checking the plugin: ${pluginName}`);
|
console.log(`Checking the plugin: ${pluginName}`);
|
||||||
|
|
||||||
|
const epRootDir = await fsp.realpath(path.join(await fsp.realpath(__dirname), '../../..'));
|
||||||
|
console.log(`Etherpad root directory: ${epRootDir}`);
|
||||||
|
process.chdir(epRootDir);
|
||||||
|
|
||||||
const optArgs = process.argv.slice(3);
|
const optArgs = process.argv.slice(3);
|
||||||
const autoPush = optArgs.includes('autopush');
|
const autoPush = optArgs.includes('autopush');
|
||||||
const autoCommit = autoPush || optArgs.includes('autocommit');
|
const autoCommit = autoPush || optArgs.includes('autocommit');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue