mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Merge #4580
4580: Fix invoking cargo without consulting CARGO env var or standard installation paths r=matklad a=Veetaha Followup for #4329 The pr essentially fixes [this bug](https://youtu.be/EzQ7YIIo1rY?t=2189) cc @lefticus Co-authored-by: veetaha <veetaha2@gmail.com>
This commit is contained in:
commit
131ccd9540
14 changed files with 140 additions and 81 deletions
|
@ -1,6 +1,7 @@
|
|||
import * as vscode from 'vscode';
|
||||
import * as lc from 'vscode-languageclient';
|
||||
import * as ra from './lsp_ext';
|
||||
import * as toolchain from "./toolchain";
|
||||
|
||||
import { Ctx, Cmd } from './ctx';
|
||||
import { startDebugSession, getDebugConfiguration } from './debug';
|
||||
|
@ -175,7 +176,7 @@ export function createTask(spec: ra.Runnable): vscode.Task {
|
|||
const definition: CargoTaskDefinition = {
|
||||
type: 'cargo',
|
||||
label: spec.label,
|
||||
command: spec.bin,
|
||||
command: toolchain.getPathForExecutable(spec.kind),
|
||||
args: spec.extraArgs ? [...spec.args, '--', ...spec.extraArgs] : spec.args,
|
||||
env: Object.assign({}, process.env, spec.env),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue