diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 25e68e344..d3ec4b721 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,7 @@ mod http_util; pub mod isolate; pub mod js_errors; pub mod libdeno; +pub mod modules; pub mod msg; pub mod msg_util; pub mod ops; @@ -90,7 +91,7 @@ fn main() { flags.allow_write = true; } - let should_prefetch = flags.prefetch; + let should_prefetch = flags.prefetch || flags.info; let should_display_info = flags.info; let state = Arc::new(isolate::IsolateState::new(flags, rest_argv, None)); @@ -107,14 +108,19 @@ fn main() { // Execute input file. if isolate.state.argv.len() > 1 { let input_filename = isolate.state.argv[1].clone(); + isolate + .execute_mod(&input_filename, should_prefetch) + .unwrap_or_else(print_err_and_exit); + if should_display_info { // Display file info and exit. Do not run file - isolate.state.dir.print_file_info(input_filename); + modules::print_file_info( + &isolate.modules.borrow(), + &isolate.state.dir, + input_filename, + ); std::process::exit(0); } - isolate - .execute_mod(&input_filename, should_prefetch) - .unwrap_or_else(print_err_and_exit); } isolate |