2019-01-12 03:33:27 +00:00
|
|
|
'use strict';
|
2018-03-18 11:59:38 +00:00
|
|
|
|
2019-01-12 03:33:27 +00:00
|
|
|
const path = require('path');
|
2018-03-18 11:59:38 +00:00
|
|
|
|
2019-01-12 03:33:27 +00:00
|
|
|
module.exports = function getRunCmdEnv() {
|
|
|
|
const env = {};
|
|
|
|
Object.keys(process.env).forEach(key => {
|
|
|
|
env[key] = process.env[key];
|
|
|
|
});
|
2018-03-18 11:59:38 +00:00
|
|
|
// make sure `antd-tools/node_modules/.bin` in the PATH env
|
2019-01-12 03:33:27 +00:00
|
|
|
const nodeModulesBinDir = path.join(__dirname, '../../node_modules/.bin');
|
|
|
|
env.PATH = env.PATH ? `${nodeModulesBinDir}:${env.PATH}` : nodeModulesBinDir;
|
|
|
|
return env;
|
|
|
|
};
|