revert: fix: allow plugins to set environment variables to be used by other plugins

This reverts commit 68f7e928f9.
This commit is contained in:
Pierre Vanduynslager
2020-02-07 17:50:14 -05:00
parent 68f7e928f9
commit a93c96fec9
2 changed files with 2 additions and 51 deletions
+2 -3
View File
@@ -6,7 +6,7 @@ const PLUGINS_DEFINITIONS = require('../definitions/plugins');
const {loadPlugin, parseConfig} = require('./utils');
module.exports = (context, type, pluginOpt, pluginsPath) => {
const {stdout, stderr, options, logger, env} = context;
const {stdout, stderr, options, logger} = context;
if (!pluginOpt) {
return noop;
}
@@ -32,11 +32,10 @@ module.exports = (context, type, pluginOpt, pluginsPath) => {
if (!input.options.dryRun || dryRun) {
logger.log(`Start step "${type}" of plugin "${pluginName}"`);
const result = await func({
...cloneDeep(omit(input, ['stdout', 'stderr', 'logger', 'env'])),
...cloneDeep(omit(input, ['stdout', 'stderr', 'logger'])),
stdout,
stderr,
logger: logger.scope(logger.scopeName, pluginName),
env,
});
if (outputValidator && !outputValidator(result)) {
throw getError(`E${type.toUpperCase()}OUTPUT`, {result, pluginName});