mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 01:29:14 -05:00
chore(tests): delete the temporary deno dir when dropping the test lsp client (#11749)
This commit is contained in:
parent
4b800f5d26
commit
480cfda8d5
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@ use std::process::Command;
|
|||
use std::process::Stdio;
|
||||
use std::time::Duration;
|
||||
use std::time::Instant;
|
||||
use tempfile::TempDir;
|
||||
|
||||
lazy_static! {
|
||||
static ref CONTENT_TYPE_REG: Regex =
|
||||
|
@ -97,6 +98,7 @@ pub struct LspClient {
|
|||
request_id: u64,
|
||||
start: Instant,
|
||||
writer: io::BufWriter<ChildStdin>,
|
||||
_temp_deno_dir: TempDir, // directory will be deleted on drop
|
||||
}
|
||||
|
||||
impl Drop for LspClient {
|
||||
|
@ -179,6 +181,7 @@ impl LspClient {
|
|||
request_id: 1,
|
||||
start: Instant::now(),
|
||||
writer,
|
||||
_temp_deno_dir: deno_dir,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue