mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Support 'runnables' options in the vs code extension
This commit is contained in:
parent
4a1b4b23bb
commit
5b26629a4d
5 changed files with 31 additions and 2 deletions
|
@ -129,6 +129,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
}
|
||||
|
||||
const args = [...runnable.args.cargoArgs]; // should be a copy!
|
||||
args.push(...runnable.args.cargoExtraArgs); // Append user-specified cargo options.
|
||||
if (runnable.args.executableArgs.length > 0) {
|
||||
args.push('--', ...runnable.args.executableArgs);
|
||||
}
|
||||
|
@ -139,6 +140,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
args: args.slice(1),
|
||||
cwd: runnable.args.workspaceRoot || ".",
|
||||
env: prepareEnv(runnable, config.runnableEnv),
|
||||
overrideCargo: runnable.args.overrideCargo,
|
||||
};
|
||||
|
||||
const target = vscode.workspace.workspaceFolders![0]; // safe, see main activate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue