mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
plugins: Pass --no-production
instead of setting NODE_ENV=development
This commit is contained in:
parent
dcf7891316
commit
689a75b381
1 changed files with 6 additions and 7 deletions
|
@ -73,14 +73,13 @@ exports.update = async () => {
|
||||||
|
|
||||||
exports.getPackages = async () => {
|
exports.getPackages = async () => {
|
||||||
logger.info('Running npm to get a list of installed plugins...');
|
logger.info('Running npm to get a list of installed plugins...');
|
||||||
// Note: Do not pass `--prod` because it does not work if there is no package.json.
|
// Notes:
|
||||||
const np = runNpm(['ls', '--long', '--json', '--depth=0'], {
|
// * Do not pass `--prod` otherwise `npm ls` will fail if there is no `package.json`.
|
||||||
|
// * The `--no-production` flag is required (or the `NODE_ENV` environment variable must be
|
||||||
|
// unset or set to `development`) because otherwise `npm ls` will not mention any packages
|
||||||
|
// that are not included in `package.json` (which is expected to not exist).
|
||||||
|
const np = runNpm(['ls', '--long', '--json', '--depth=0', '--no-production'], {
|
||||||
stdoutLogger: null, // We want to capture stdout, so don't attempt to log it.
|
stdoutLogger: null, // We want to capture stdout, so don't attempt to log it.
|
||||||
env: {
|
|
||||||
...process.env,
|
|
||||||
// NODE_ENV must be set to development for `npm ls` to show files without a package.json.
|
|
||||||
NODE_ENV: 'development',
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const chunks = [];
|
const chunks = [];
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue