diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-07-26 19:43:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 23:43:31 +0000 |
commit | 134f2d5c60b7e037431c9bbf5443c2bd7b36bbc9 (patch) | |
tree | 108847c17fdd67365bdcd1e0a608155ceacb516a /test_util/src | |
parent | 56e3daa19b1a0718bbcea2beae737ce8845ceac2 (diff) |
chore: fix benchmarks (#19958)
Diffstat (limited to 'test_util/src')
-rw-r--r-- | test_util/src/lsp.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test_util/src/lsp.rs b/test_util/src/lsp.rs index 81ebd3c47..949dd25d6 100644 --- a/test_util/src/lsp.rs +++ b/test_util/src/lsp.rs @@ -1,6 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. use crate::deno_exe_path; +use crate::new_deno_dir; use crate::npm_registry_url; use crate::PathRef; use crate::TestContext; @@ -523,7 +524,11 @@ impl LspClientBuilder { } pub fn build_result(&self) -> Result<LspClient> { - let deno_dir = self.context.as_ref().unwrap().deno_dir().clone(); + let deno_dir = self + .context + .as_ref() + .map(|c| c.deno_dir().clone()) + .unwrap_or_else(new_deno_dir); let mut command = Command::new(&self.deno_exe); command .env("DENO_DIR", deno_dir.path()) |