mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
This reverts commit f291767f09.
This commit is contained in:
@@ -18,6 +18,8 @@ import * as VinylFile from 'vinyl';
|
||||
import { ThroughStream } from 'through';
|
||||
import * as sm from 'source-map';
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
|
||||
export interface ICancellationToken {
|
||||
isCancellationRequested(): boolean;
|
||||
}
|
||||
@@ -318,3 +320,9 @@ export function streamToPromise(stream: NodeJS.ReadWriteStream): Promise<void> {
|
||||
stream.on('end', () => c());
|
||||
});
|
||||
}
|
||||
|
||||
export function getElectronVersion(): string {
|
||||
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
||||
const target = /^target "(.*)"$/m.exec(yarnrc)![1];
|
||||
return target;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user