diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-02-12 21:14:02 -0500 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-18 23:04:59 -0500 |
commit | 42408febe8cdf9e30ff8d1a3bb13f4994906c53b (patch) | |
tree | 92ab3408d426f1d18a511aa16130357ed074410a /src/main.rs | |
parent | 27afbd135162b435c8af22b18622656ccab12174 (diff) |
Add window.location
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index d3ec4b721..10ae15065 100644 --- a/src/main.rs +++ b/src/main.rs @@ -105,19 +105,18 @@ fn main() { .map_err(errors::RustOrJsError::from) .unwrap_or_else(print_err_and_exit); - // Execute input file. - if isolate.state.argv.len() > 1 { - let input_filename = isolate.state.argv[1].clone(); + // Execute main module. + if let Some(main_module) = isolate.state.main_module() { + debug!("main_module {}", main_module); isolate - .execute_mod(&input_filename, should_prefetch) + .execute_mod(&main_module, should_prefetch) .unwrap_or_else(print_err_and_exit); - if should_display_info { // Display file info and exit. Do not run file modules::print_file_info( &isolate.modules.borrow(), &isolate.state.dir, - input_filename, + main_module, ); std::process::exit(0); } |