Archived
1
0

fix: resolve conflicts in build/lib/node.ts

It looks like they added a few more variables and cleaned this file up.

I removed the yarn and yarnRc stuff. Hope that doesn't break anything.
This commit is contained in:
Joe Previte 2021-02-25 12:08:12 -07:00
parent 40d0c88341
commit f214235e2d
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24

View File

@ -6,21 +6,12 @@
import * as path from 'path'; import * as path from 'path';
const root = path.dirname(path.dirname(__dirname)); const root = path.dirname(path.dirname(__dirname));
<<<<<<< HEAD
const version = process.versions.node; const version = process.versions.node;
const node = process.platform === 'win32' ? 'node.exe' : 'node';
const nodePath = path.join(root, '.build', 'node', `v${version}`, `${process.platform}-${process.arch}`, node);
=======
const yarnrcPath = path.join(root, 'remote', '.yarnrc');
const yarnrc = fs.readFileSync(yarnrcPath, 'utf8');
const version = /^target\s+"([^"]+)"$/m.exec(yarnrc)![1];
const platform = process.platform; const platform = process.platform;
const arch = platform === 'darwin' ? 'x64' : process.arch; const arch = platform === 'darwin' ? 'x64' : process.arch;
const node = platform === 'win32' ? 'node.exe' : 'node'; const node = platform === 'win32' ? 'node.exe' : 'node';
const nodePath = path.join(root, '.build', 'node', `v${version}`, `${platform}-${arch}`, node); const nodePath = path.join(root, '.build', 'node', `v${version}`, `${platform}-${arch}`, node);
>>>>>>> 89b6e0164fa770333755b11504e19a4232b1a2d4
console.log(nodePath); console.log(nodePath);