mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
chore: update to electron 17 (#143223)
* chore: bump electron@17.0.0 * Revert "chore: revert to electron@13 (#143851)" This reverts commitdf645f1450. * chore: bump electron@17.1.0 * Revert "ci: fix build with latest node-gyp" This reverts commitc3e948aa30. * chore: revert ci changes for node v16 * chore: update yarn.lock * chore: bump electron@17.1.1
This commit is contained in:
@@ -7,6 +7,7 @@ import { promises as fs, exists, realpath } from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as os from 'os';
|
||||
import * as cp from 'child_process';
|
||||
import { fileURLToPath } from 'url';
|
||||
import * as which from 'which';
|
||||
import { EventEmitter } from 'events';
|
||||
import * as iconv from '@vscode/iconv-lite-umd';
|
||||
@@ -605,13 +606,27 @@ export class Git {
|
||||
GIT_PAGER: 'cat'
|
||||
});
|
||||
|
||||
if (options.cwd) {
|
||||
options.cwd = sanitizePath(options.cwd);
|
||||
const cwd = this.getCwd(options);
|
||||
if (cwd) {
|
||||
options.cwd = sanitizePath(cwd);
|
||||
}
|
||||
|
||||
return cp.spawn(this.path, args, options);
|
||||
}
|
||||
|
||||
private getCwd(options: SpawnOptions): string | undefined {
|
||||
const cwd = options.cwd;
|
||||
if (typeof cwd === 'undefined' || typeof cwd === 'string') {
|
||||
return cwd;
|
||||
}
|
||||
|
||||
if (cwd.protocol === 'file:') {
|
||||
return fileURLToPath(cwd);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
private log(output: string): void {
|
||||
this._onOutput.emit('log', output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user