From 72ccb2838213dbcb0129fe31c05ab814f19a308e Mon Sep 17 00:00:00 2001 From: muxator Date: Mon, 12 Nov 2018 23:20:39 +0100 Subject: [PATCH] AbsolutePaths: initial work to allow Etherpad to be run without changing CWD With this change, it is no longer necessary to "cd" to the Etherpad base directory to start it: Etherpad runs from everywhere. Known issues: - unless the program is started as before (CWD == base directory) it is still not possible to install & uninstall plugins via the web interface --HG-- branch : absolute-paths --- src/static/js/pluginfw/plugins.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/static/js/pluginfw/plugins.js b/src/static/js/pluginfw/plugins.js index ed9c66a37..ebb1a0034 100644 --- a/src/static/js/pluginfw/plugins.js +++ b/src/static/js/pluginfw/plugins.js @@ -5,6 +5,7 @@ var fs = require("fs"); var tsort = require("./tsort"); var util = require("util"); var _ = require("underscore"); +var settings = require('../../../node/utils/Settings'); var pluginUtils = require('./shared'); @@ -95,7 +96,7 @@ exports.update = async function () { exports.getPackages = async function () { // Load list of installed NPM packages, flatten it to a list, and filter out only packages with names that - var dir = path.resolve(npm.dir, '..'); + var dir = settings.root; let data = await util.promisify(readInstalled)(dir); var packages = {};