aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {