diff --git a/cli/flags.rs b/cli/flags.rs index ce0e8702d4df3a..1d424516b2ecdd 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -23,9 +23,6 @@ pub struct DenoFlags { pub no_prompts: bool, pub types: bool, pub prefetch: bool, - pub info: bool, - pub fmt: bool, - pub eval: bool, } impl<'a> From> for DenoFlags { @@ -77,15 +74,6 @@ impl<'a> From> for DenoFlags { if matches.is_present("prefetch") { flags.prefetch = true; } - if matches.is_present("info") { - flags.info = true; - } - if matches.is_present("fmt") { - flags.fmt = true; - } - if matches.is_present("eval") { - flags.eval = true; - } flags } diff --git a/cli/main.rs b/cli/main.rs index 32a65eb255c498..a7197c6f0cd903 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -139,7 +139,8 @@ fn get_worker_and_state( } fn info_command(flags: DenoFlags, argv: Vec) { - let should_display_info = flags.info; + // TODO(bartlomieju) legacy, to be removed + let should_display_info = true; let (mut worker, state) = get_worker_and_state(flags, argv); if let Some(main_module) = state.main_module() { @@ -151,7 +152,7 @@ fn info_command(flags: DenoFlags, argv: Vec) { let main_url = root_specifier_to_url(&main_module).unwrap(); worker - .execute_mod_async(&main_url, true) + .execute_mod_async(&main_url, should_display_info) .and_then(move |worker| { if should_display_info { // Display file info and exit. Do not run file @@ -214,8 +215,7 @@ fn run_repl(flags: DenoFlags, argv: Vec) { } fn run_script(flags: DenoFlags, argv: Vec) { - let should_prefetch = flags.prefetch || flags.info; - let should_display_info = flags.info; + let should_prefetch = flags.prefetch; let (mut worker, state) = get_worker_and_state(flags, argv); @@ -232,11 +232,6 @@ fn run_script(flags: DenoFlags, argv: Vec) { worker .execute_mod_async(&main_url, should_prefetch) .and_then(move |worker| { - if should_display_info { - // Display file info and exit. Do not run file - print_file_info(&worker, &main_module); - std::process::exit(0); - } worker.then(|result| { js_check(result); Ok(())