diff options
Diffstat (limited to 'cli/lib.rs')
-rw-r--r-- | cli/lib.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/lib.rs b/cli/lib.rs index 227dcdb40..42f5bbad1 100644 --- a/cli/lib.rs +++ b/cli/lib.rs @@ -303,6 +303,8 @@ async fn install_command( } async fn fetch_command(flags: DenoFlags) { + let args = flags.argv.clone(); + let (mut worker, state) = create_worker_and_state(flags); let main_module = state.main_module.as_ref().unwrap().clone(); @@ -313,6 +315,18 @@ async fn fetch_command(flags: DenoFlags) { let result = worker.execute_mod_async(&main_module, None, true).await; js_check(result); + + // resolve modules for rest of args if present + let files_len = args.len(); + if files_len > 2 { + for next_specifier in args.iter().take(files_len).skip(2) { + let next_module = + ModuleSpecifier::resolve_url_or_path(&next_specifier).unwrap(); + let result = worker.execute_mod_async(&next_module, None, true).await; + js_check(result); + } + } + if state.flags.lock_write { if let Some(ref lockfile) = state.lockfile { let g = lockfile.lock().unwrap(); |