summaryrefslogtreecommitdiff
path: root/test_util/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'test_util/src/lib.rs')
-rw-r--r--test_util/src/lib.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs
index 8dcd4f623..544015413 100644
--- a/test_util/src/lib.rs
+++ b/test_util/src/lib.rs
@@ -1151,11 +1151,15 @@ pub fn new_deno_dir() -> TempDir {
}
pub fn deno_cmd() -> Command {
- let e = deno_exe_path();
let deno_dir = new_deno_dir();
+ deno_cmd_with_deno_dir(deno_dir.path())
+}
+
+pub fn deno_cmd_with_deno_dir(deno_dir: &std::path::Path) -> Command {
+ let e = deno_exe_path();
assert!(e.exists());
let mut c = Command::new(e);
- c.env("DENO_DIR", deno_dir.path());
+ c.env("DENO_DIR", deno_dir);
c
}