diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs index 705b9db3d..f6a9c49ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -88,15 +88,6 @@ fn main() { let mut isolate = isolate::Isolate::new(snapshot, state, ops::dispatch); tokio_util::init(|| { - // Requires tokio - if should_display_info { - isolate - .state - .dir - .print_file_info(isolate.state.argv[1].clone()); - std::process::exit(0); - } - // Setup runtime. isolate .execute("denoMain();") @@ -106,6 +97,11 @@ fn main() { // Execute input file. if isolate.state.argv.len() > 1 { let input_filename = isolate.state.argv[1].clone(); + if should_display_info { + // Display file info and exit. Do not run file + isolate.state.dir.print_file_info(input_filename); + std::process::exit(0); + } isolate .execute_mod(&input_filename, should_prefetch) .unwrap_or_else(print_err_and_exit); |