Merge from vscode 3d67364fbfcf676d93be64f949e9b33e7f1b969e (#5028)

This commit is contained in:
Anthony Dresser
2019-04-14 22:29:14 -07:00
committed by GitHub
parent 6dbf757385
commit 57242a2e13
210 changed files with 4898 additions and 3018 deletions

View File

@@ -127,6 +127,7 @@ export class Application {
verbose: this.options.verbose,
log: this.options.log,
extraArgs,
remote: this.options.remote
});
this._workbench = new Workbench(this._code, this.userDataPath);

View File

@@ -56,7 +56,8 @@ const opts = minimist(args, {
'log'
],
boolean: [
'verbose'
'verbose',
'remote'
],
default: {
verbose: false
@@ -210,7 +211,8 @@ function createOptions(): ApplicationOptions {
logger: new MultiLogger(loggers),
verbose: opts.verbose,
log,
screenshotsPath
screenshotsPath,
remote: opts.remote
};
}

View File

@@ -90,6 +90,7 @@ export interface SpawnOptions {
verbose?: boolean;
extraArgs?: string[];
log?: string;
remote?: boolean;
}
async function createDriverHandle(): Promise<string> {
@@ -120,6 +121,15 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
'--driver', handle
];
if (options.remote) {
// Replace workspace path with URI
args.shift();
args.push(
`--${options.workspacePath.endsWith('.code-workspace') ? 'file' : 'folder'}-uri`,
`vscode-remote://test+test${options.workspacePath}`,
);
}
if (!codePath) {
args.unshift(repoPath);
}