mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
fix(cli): correctly determine emit state with redirects (#9287)
Fixes #9129
This commit is contained in:
parent
5213bed533
commit
ecfda65eff
2 changed files with 32 additions and 1 deletions
|
@ -1470,7 +1470,7 @@ impl Graph {
|
|||
true
|
||||
}
|
||||
} else {
|
||||
false
|
||||
true
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -955,6 +955,37 @@ fn ts_dependency_recompilation() {
|
|||
assert!(stdout_output.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ts_no_recheck_on_redirect() {
|
||||
let deno_dir = util::new_deno_dir();
|
||||
let e = util::deno_exe_path();
|
||||
|
||||
let redirect_ts = util::root_path().join("cli/tests/017_import_redirect.ts");
|
||||
assert!(redirect_ts.is_file());
|
||||
let mut cmd = Command::new(e.clone());
|
||||
cmd.env("DENO_DIR", deno_dir.path());
|
||||
let mut initial = cmd
|
||||
.current_dir(util::root_path())
|
||||
.arg("run")
|
||||
.arg(redirect_ts.clone())
|
||||
.spawn()
|
||||
.expect("failed to span script");
|
||||
let status_initial =
|
||||
initial.wait().expect("failed to wait for child process");
|
||||
assert!(status_initial.success());
|
||||
|
||||
let mut cmd = Command::new(e);
|
||||
cmd.env("DENO_DIR", deno_dir.path());
|
||||
let output = cmd
|
||||
.current_dir(util::root_path())
|
||||
.arg("run")
|
||||
.arg(redirect_ts)
|
||||
.output()
|
||||
.expect("failed to spawn script");
|
||||
|
||||
assert!(std::str::from_utf8(&output.stderr).unwrap().is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ts_reload() {
|
||||
let hello_ts = util::root_path().join("cli/tests/002_hello.ts");
|
||||
|
|
Loading…
Reference in a new issue