提交 1b2f1980 编写于 作者: J Joao Moreno

forward extraArgs to app

上级 72bd5854
......@@ -119,7 +119,8 @@ export class SpectronApplication {
workspacePath: workspaceOrFolder,
userDataDir: this.options.userDataDir,
extensionsPath: this.options.extensionsPath,
verbose: this.options.verbose
verbose: this.options.verbose,
extraArgs
});
const driver = new CodeDriver(this.codeInstance.driver, this.options.verbose);
......
......@@ -72,14 +72,6 @@ export class Code {
}
}
export interface SpawnOptions {
codePath?: string;
workspacePath: string;
userDataDir: string;
extensionsPath: string;
verbose: boolean;
}
export async function connect(child: cp.ChildProcess, outPath: string, handlePath: string): Promise<Code> {
let errCount = 0;
......@@ -103,6 +95,15 @@ export async function connect(child: cp.ChildProcess, outPath: string, handlePat
const instances = new Set<cp.ChildProcess>();
process.once('exit', () => instances.forEach(code => code.kill()));
export interface SpawnOptions {
codePath?: string;
workspacePath: string;
userDataDir: string;
extensionsPath: string;
verbose: boolean;
extraArgs?: string[];
}
export async function spawn(options: SpawnOptions): Promise<Code> {
const codePath = options.codePath;
const electronPath = codePath ? getBuildElectronPath(codePath) : getDevElectronPath();
......@@ -126,6 +127,10 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
args.unshift(repoPath);
}
if (options.extraArgs) {
args.push(...options.extraArgs);
}
const spawnOptions: cp.SpawnOptions = {};
if (options.verbose) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册