mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
@@ -11,7 +11,7 @@ import ts from 'typescript';
|
||||
import { pathToFileURL } from 'url';
|
||||
import workerpool from 'workerpool';
|
||||
import { StaticLanguageServiceHost } from './staticLanguageServiceHost.ts';
|
||||
import * as buildfile from '../../buildfile.js';
|
||||
import * as buildfile from '../../buildfile.ts';
|
||||
|
||||
class ShortIdent {
|
||||
|
||||
|
||||
@@ -9,7 +9,11 @@ import fs from 'fs';
|
||||
const root = path.dirname(path.dirname(import.meta.dirname));
|
||||
const npmrcPath = path.join(root, 'remote', '.npmrc');
|
||||
const npmrc = fs.readFileSync(npmrcPath, 'utf8');
|
||||
const version = /^target="(.*)"$/m.exec(npmrc)[1];
|
||||
const version = /^target="(.*)"$/m.exec(npmrc)?.[1];
|
||||
|
||||
if (!version) {
|
||||
throw new Error('Failed to extract Node version from .npmrc');
|
||||
}
|
||||
|
||||
const platform = process.platform;
|
||||
const arch = process.arch;
|
||||
Reference in New Issue
Block a user