From 623a5ee563649e6cf0802e1460d63f66c22a8ea3 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 16 Aug 2022 15:16:46 +0000 Subject: [PATCH] Default plugins dir to /plugins --- packages/server/src/app.ts | 7 ++++++- packages/server/src/environment.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 6f63715cfb..e9a5661093 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -138,7 +138,12 @@ module.exports = server.listen(env.PORT || 0, async () => { } // monitor plugin directory if required - if (env.SELF_HOSTED && !env.MULTI_TENANCY && env.PLUGINS_DIR && fs.existsSync(env.PLUGINS_DIR)) { + if ( + env.SELF_HOSTED && + !env.MULTI_TENANCY && + env.PLUGINS_DIR && + fs.existsSync(env.PLUGINS_DIR) + ) { const watchPath = path.join(env.PLUGINS_DIR, "./**/dist/*.tar.gz") chokidar .watch(watchPath, { diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index 5a7aa61b9d..5524159a78 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -77,7 +77,7 @@ module.exports = { SQL_MAX_ROWS: process.env.SQL_MAX_ROWS, BB_ADMIN_USER_EMAIL: process.env.BB_ADMIN_USER_EMAIL, BB_ADMIN_USER_PASSWORD: process.env.BB_ADMIN_USER_PASSWORD, - PLUGINS_DIR: process.env.PLUGINS_DIR, + PLUGINS_DIR: process.env.PLUGINS_DIR || "/plugins", // flags ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS, DISABLE_THREADING: process.env.DISABLE_THREADING,