diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2019-02-01 22:28:31 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-02 01:28:31 -0500 |
commit | 3650bae5f6565cb6de2706512df145c86e8525cd (patch) | |
tree | 2bc066e39dc60fdb6ce7fd615c7f9d92deb45f54 /src/main.rs | |
parent | 16ed1f2545b34851ebdb9095251236fb51e39f5d (diff) |
Add --info flag to display file info (compiled code/source map) (#1647)
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 1b93ea86d..d50a68ad5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,12 +81,22 @@ fn main() { }); let should_prefetch = flags.prefetch; + let should_display_info = flags.info; let state = Arc::new(isolate::IsolateState::new(flags, rest_argv, None)); let snapshot = snapshot::deno_snapshot(); 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();") |