Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(upgrade): stop running deno lsp processes on windows before attempting to replace executable #26542

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more precise
  • Loading branch information
dsherret committed Oct 25, 2024
commit ecffe8aace7c9bd14ecc418ad13ba6445530481d
3 changes: 2 additions & 1 deletion cli/tools/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -972,10 +972,11 @@ fn check_windows_access_denied_error(

#[cfg(windows)]
fn kill_running_deno_lsp_processes() {
// limit this to `deno lsp` invocations to avoid killing important programs someone might be running
let _ = Command::new("powershell")
.args(&[
"-Command",
"Get-Process | Where-Object { $_.ProcessName -eq 'deno' -and $_.CommandLine -match 'lsp' } | Stop-Process -Force",
"Get-Process | Where-Object { $_.ProcessName -eq 'deno' -and ($_.CommandLine -split ' ')[1] -eq 'lsp' } | Stop-Process -Force",
])
.output();
}
Expand Down
Loading