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
pull/3901/head
muxator 2018-11-12 23:20:39 +01:00 committed by muxator
parent 5ade38c86b
commit 72ccb28382
1 changed files with 2 additions and 1 deletions

View File

@ -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 = {};