mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 04:48:52 -05:00
fix(cli): do not cache emit when diagnostics present (#12541)
Fixes #12471
This commit is contained in:
parent
2ab3664e50
commit
56d9a020d9
4 changed files with 33 additions and 3 deletions
|
@ -389,7 +389,7 @@ impl ProcState {
|
|||
.map(|cf| ModuleSpecifier::from_file_path(&cf.path).unwrap());
|
||||
let options = emit::CheckOptions {
|
||||
debug: self.flags.log_level == Some(log::Level::Debug),
|
||||
emit_with_diagnostics: true,
|
||||
emit_with_diagnostics: false,
|
||||
maybe_config_specifier,
|
||||
ts_config,
|
||||
};
|
||||
|
|
|
@ -1396,6 +1396,38 @@ fn rust_log() {
|
|||
assert!(!output.stderr.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dont_cache_on_check_fail() {
|
||||
let deno_dir = util::new_deno_dir();
|
||||
|
||||
let mut deno_cmd = util::deno_cmd_with_deno_dir(deno_dir.path());
|
||||
let output = deno_cmd
|
||||
.current_dir(util::testdata_path())
|
||||
.arg("run")
|
||||
.arg("--reload")
|
||||
.arg("error_003_typescript.ts")
|
||||
.stderr(std::process::Stdio::piped())
|
||||
.spawn()
|
||||
.unwrap()
|
||||
.wait_with_output()
|
||||
.unwrap();
|
||||
assert!(!output.status.success());
|
||||
assert!(!output.stderr.is_empty());
|
||||
|
||||
let mut deno_cmd = util::deno_cmd_with_deno_dir(deno_dir.path());
|
||||
let output = deno_cmd
|
||||
.current_dir(util::testdata_path())
|
||||
.arg("run")
|
||||
.arg("error_003_typescript.ts")
|
||||
.stderr(std::process::Stdio::piped())
|
||||
.spawn()
|
||||
.unwrap()
|
||||
.wait_with_output()
|
||||
.unwrap();
|
||||
assert!(!output.status.success());
|
||||
assert!(!output.stderr.is_empty());
|
||||
}
|
||||
|
||||
mod permissions {
|
||||
use test_util as util;
|
||||
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
[WILDCARD]
|
||||
error: Cannot load module "file://[WILDCARD]/does_not_exist.js".
|
||||
at file://[WILDCARD]/error_missing_module_named_import.ts:1:19
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
DANGER: TLS certificate validation is disabled for: deno.land
|
||||
error: error sending request for url (https://localhost:5545/subdir/mod2.ts): error trying to connect: invalid certificate: UnknownIssuer
|
||||
at file://[WILDCARD]/cafile_url_imports.ts:1:28
|
||||
|
|
Loading…
Reference in a new issue