Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/lib/node.js
3520 views
1
"use strict";
2
var __importDefault = (this && this.__importDefault) || function (mod) {
3
return (mod && mod.__esModule) ? mod : { "default": mod };
4
};
5
Object.defineProperty(exports, "__esModule", { value: true });
6
/*---------------------------------------------------------------------------------------------
7
* Copyright (c) Microsoft Corporation. All rights reserved.
8
* Licensed under the MIT License. See License.txt in the project root for license information.
9
*--------------------------------------------------------------------------------------------*/
10
const path_1 = __importDefault(require("path"));
11
const fs_1 = __importDefault(require("fs"));
12
const root = path_1.default.dirname(path_1.default.dirname(__dirname));
13
const npmrcPath = path_1.default.join(root, 'remote', '.npmrc');
14
const npmrc = fs_1.default.readFileSync(npmrcPath, 'utf8');
15
const version = /^target="(.*)"$/m.exec(npmrc)[1];
16
const platform = process.platform;
17
const arch = process.arch;
18
const node = platform === 'win32' ? 'node.exe' : 'node';
19
const nodePath = path_1.default.join(root, '.build', 'node', `v${version}`, `${platform}-${arch}`, node);
20
console.log(nodePath);
21
//# sourceMappingURL=node.js.map
22