Cargo.lock 🔗
@@ -12854,7 +12854,6 @@ dependencies = [
"settings",
"sha2",
"shellexpand 2.1.2",
- "shlex",
"smallvec",
"smol",
"snippet",
Jakub Konka created
Cargo.lock | 1 -
crates/project/Cargo.toml | 1 -
crates/project/src/lsp_store/lsp_ext_command.rs | 3 ++-
3 files changed, 2 insertions(+), 3 deletions(-)
@@ -12854,7 +12854,6 @@ dependencies = [
"settings",
"sha2",
"shellexpand 2.1.2",
- "shlex",
"smallvec",
"smol",
"snippet",
@@ -72,7 +72,6 @@ serde_json.workspace = true
settings.workspace = true
sha2.workspace = true
shellexpand.workspace = true
-shlex.workspace = true
smallvec.workspace = true
smol.workspace = true
snippet.workspace = true
@@ -657,6 +657,7 @@ impl LspCommand for GetLspRunnables {
);
task_template.args.extend(cargo.cargo_args);
if !cargo.executable_args.is_empty() {
+ let shell_kind = task_template.shell.shell_kind(cfg!(windows));
task_template.args.push("--".to_string());
task_template.args.extend(
cargo
@@ -682,7 +683,7 @@ impl LspCommand for GetLspRunnables {
// That bit is not auto-expanded when using single quotes.
// Escape extra cargo args unconditionally as those are unlikely to contain `~`.
.flat_map(|extra_arg| {
- shlex::try_quote(&extra_arg).ok().map(|s| s.to_string())
+ shell_kind.try_quote(&extra_arg).map(|s| s.to_string())
}),
);
}