Removed unnecessary extraArgs for cargo invocation

This commit is contained in:
vsrs 2020-04-30 18:53:34 +03:00
parent 10836543d6
commit 11e9e4b1fb
2 changed files with 3 additions and 6 deletions

View file

@ -55,12 +55,9 @@ export class Cargo {
return artifacts;
}
public async executableFromArgs(cargoArgs: string[], extraArgs?: string[]): Promise<string> {
public async executableFromArgs(args: string[]): Promise<string> {
let cargoArgs = [...args]; // to remain args unchanged
cargoArgs.push("--message-format=json");
if (extraArgs) {
cargoArgs.push('--');
cargoArgs.push(...extraArgs);
}
const artifacts = await this.artifactsFromArgs(cargoArgs);

View file

@ -84,7 +84,7 @@ async function getCppvsDebugConfig(config: ra.Runnable, sourceFileMap: Record<st
debugOutput.clear();
const cargo = new Cargo(config.cwd || '.', debugOutput);
const executable = await cargo.executableFromArgs(config.args, config.extraArgs);
const executable = await cargo.executableFromArgs(config.args);
// if we are here, there were no compilation errors.
return {