aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
authorvsrs <[email protected]>2020-04-30 16:53:34 +0100
committervsrs <[email protected]>2020-04-30 16:53:34 +0100
commit11e9e4b1fb48fb24a206c65c43fb374fe57dc26f (patch)
tree68aa03117db2df0838e6d3b2888cea2d9a764381 /editors/code/src
parent10836543d693675a9a2fd90130b1a816ede90fea (diff)
Removed unnecessary extraArgs for cargo invocation
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/cargo.ts7
-rw-r--r--editors/code/src/commands/runnables.ts2
2 files changed, 3 insertions, 6 deletions
diff --git a/editors/code/src/cargo.ts b/editors/code/src/cargo.ts
index 50f93856d..3a7e70307 100644
--- a/editors/code/src/cargo.ts
+++ b/editors/code/src/cargo.ts
@@ -55,12 +55,9 @@ export class Cargo {
55 return artifacts; 55 return artifacts;
56 } 56 }
57 57
58 public async executableFromArgs(cargoArgs: string[], extraArgs?: string[]): Promise<string> { 58 public async executableFromArgs(args: string[]): Promise<string> {
59 let cargoArgs = [...args]; // to remain args unchanged
59 cargoArgs.push("--message-format=json"); 60 cargoArgs.push("--message-format=json");
60 if (extraArgs) {
61 cargoArgs.push('--');
62 cargoArgs.push(...extraArgs);
63 }
64 61
65 const artifacts = await this.artifactsFromArgs(cargoArgs); 62 const artifacts = await this.artifactsFromArgs(cargoArgs);
66 63
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts
index 36d309334..d77e8188c 100644
--- a/editors/code/src/commands/runnables.ts
+++ b/editors/code/src/commands/runnables.ts
@@ -84,7 +84,7 @@ async function getCppvsDebugConfig(config: ra.Runnable, sourceFileMap: Record<st
84 debugOutput.clear(); 84 debugOutput.clear();
85 85
86 const cargo = new Cargo(config.cwd || '.', debugOutput); 86 const cargo = new Cargo(config.cwd || '.', debugOutput);
87 const executable = await cargo.executableFromArgs(config.args, config.extraArgs); 87 const executable = await cargo.executableFromArgs(config.args);
88 88
89 // if we are here, there were no compilation errors. 89 // if we are here, there were no compilation errors.
90 return { 90 return {