diff options
author | Gurwinder Singh <vargwin@gmail.com> | 2019-06-27 19:04:12 +0530 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-27 09:34:12 -0400 |
commit | d7d3e9f9dea7bf3f6e0c6e15e1bb3d2326f0fdf9 (patch) | |
tree | 6c21e306254e556dcaf390f683faa74157d7b712 | |
parent | fb6d57a28172aeaaa5fdb31d5775e190bdfaa1c1 (diff) |
Fix multiple error messages for a missing file (#2587)
-rw-r--r-- | cli/state.rs | 5 | ||||
-rw-r--r-- | tests/error_013_missing_script.out | 1 | ||||
-rw-r--r-- | tests/error_013_missing_script.test | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/cli/state.rs b/cli/state.rs index d49cfd6eb..fd209a0f2 100644 --- a/cli/state.rs +++ b/cli/state.rs @@ -181,10 +181,7 @@ impl Loader for ThreadSafeState { self.metrics.resolve_count.fetch_add(1, Ordering::SeqCst); Box::new( fetch_module_meta_data_and_maybe_compile_async(self, module_specifier) - .map_err(|err| { - eprintln!("{}", err); - err - }).map(|module_meta_data| deno::SourceCodeInfo { + .map(|module_meta_data| deno::SourceCodeInfo { // Real module name, might be different from initial URL // due to redirections. code: module_meta_data.js_source(), diff --git a/tests/error_013_missing_script.out b/tests/error_013_missing_script.out new file mode 100644 index 000000000..9836c361f --- /dev/null +++ b/tests/error_013_missing_script.out @@ -0,0 +1 @@ +Cannot resolve module "[WILDCARD]missing_file_name" diff --git a/tests/error_013_missing_script.test b/tests/error_013_missing_script.test new file mode 100644 index 000000000..76c77da8d --- /dev/null +++ b/tests/error_013_missing_script.test @@ -0,0 +1,4 @@ +args: run --reload missing_file_name +check_stderr: true +exit_code: 1 +output: tests/error_013_missing_script.out |