Skip to content

Commit 56cd288

Browse files
committed
fix env in postinstall
1 parent cc5dd0c commit 56cd288

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

build/npm/postinstall.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
1313
* @param {*} [opts]
1414
*/
1515
function yarnInstall(location, opts) {
16-
opts = opts || {};
16+
opts = opts || { env: process.env };
1717
opts.cwd = location;
1818
opts.stdio = 'inherit';
1919

@@ -52,8 +52,6 @@ extensions.forEach(extension => yarnInstall(`extensions/${extension}`));
5252
function yarnInstallBuildDependencies() {
5353
// make sure we install the deps of build/lib/watch for the system installed
5454
// node, since that is the driver of gulp
55-
//@ts-ignore
56-
const env = Object.assign({}, process.env);
5755
const watchPath = path.join(path.dirname(__dirname), 'lib', 'watch');
5856
const yarnrcPath = path.join(watchPath, '.yarnrc');
5957

@@ -66,7 +64,7 @@ target "${target}"
6664
runtime "${runtime}"`;
6765

6866
fs.writeFileSync(yarnrcPath, yarnrc, 'utf8');
69-
yarnInstall(watchPath, { env });
67+
yarnInstall(watchPath);
7068
}
7169

7270
yarnInstall(`build`); // node modules required for build

0 commit comments

Comments
 (0)