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-pathspull/3901/head
parent
5ade38c86b
commit
72ccb28382
|
@ -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 = {};
|
||||
|
|
Loading…
Reference in New Issue