Allow to override build path with PKG_BUILD_PATH (#152)

To workaround a path problem with older Node versions and some
Windows environments.
This commit is contained in:
Jesse Chan 2021-04-02 20:01:47 +08:00 committed by GitHub
parent 2c5d74bf04
commit 532fb10d91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ import { hostArch, hostPlatform } from './system';
import { log } from './log';
import patchesJson from '../patches/patches.json';
const buildPath = uniqueTempDir();
const buildPath = path.resolve(process.env.PKG_BUILD_PATH || uniqueTempDir());
const nodePath = path.join(buildPath, 'node');
const patchesPath = path.resolve(__dirname, '../patches');
const nodeRepo = 'https://github.com/nodejs/node';