diff options
author | Andy Hayden <andyhayden1@gmail.com> | 2018-11-05 22:41:39 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-11-06 06:25:38 -0800 |
commit | 7a17e2aec6307d37b7fe3bd9c7af0beb15ec924b (patch) | |
tree | e58d0d9688f2cdec98bf69b5bf011841e79b3a30 /src/main.rs | |
parent | e1d5f82d36f08b9c7a7c6233b7ce354a5cf82836 (diff) |
Remove flags::process
It was doing two independent things:
- print help and exit
- set log level
It's better to do those explicitly in main.rs
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index ca15d468b..c080da24c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,8 +81,19 @@ fn main() { eprintln!("{}", err); std::process::exit(1) }); + + if flags.help { + println!("{}", &usage_string); + std::process::exit(0); + } + + log::set_max_level(if flags.log_debug { + log::LevelFilter::Debug + } else { + log::LevelFilter::Info + }); + let mut isolate = isolate::Isolate::new(flags, rest_argv, ops::dispatch); - flags::process(&isolate.state.flags, &usage_string); tokio_util::init(|| { isolate .execute("deno_main.js", "denoMain();") |