chore: update to electron 17 (#143223)

* chore: bump electron@17.0.0

* Revert "chore: revert to electron@13 (#143851)"

This reverts commit df645f1450.

* chore: bump electron@17.1.0

* Revert "ci: fix build with latest node-gyp"

This reverts commit c3e948aa30.

* chore: revert ci changes for node v16

* chore: update yarn.lock

* chore: bump electron@17.1.1
This commit is contained in:
Robo
2022-03-11 00:51:37 +09:00
committed by GitHub
parent 9109c6531f
commit 32d40cf44e
113 changed files with 509 additions and 453 deletions

View File

@@ -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);
}