diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-05-01 20:33:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-01 15:33:11 -0400 |
commit | 96fd0f4692126516239d61784caf6599aa884844 (patch) | |
tree | 8ebeafc5562297104390da4d0c159940006fc28f /cli/lib.rs | |
parent | 6661e7e287aa595eccdc8d49940c40953b1f69bc (diff) |
BREAKING: feat(cli/installer): Support guessing the executable name (#5036)
Diffstat (limited to 'cli/lib.rs')
-rw-r--r-- | cli/lib.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cli/lib.rs b/cli/lib.rs index fc37ff2af..673340cb9 100644 --- a/cli/lib.rs +++ b/cli/lib.rs @@ -291,10 +291,10 @@ async fn info_command( async fn install_command( flags: Flags, - root: Option<PathBuf>, - exe_name: String, module_url: String, args: Vec<String>, + name: Option<String>, + root: Option<PathBuf>, force: bool, ) -> Result<(), ErrBox> { // Firstly fetch and compile module, this step ensures that module exists. @@ -304,7 +304,7 @@ async fn install_command( let main_module = ModuleSpecifier::resolve_url_or_path(&module_url)?; let mut worker = create_main_worker(global_state, main_module.clone())?; worker.preload_module(&main_module).await?; - installer::install(flags, root, &exe_name, &module_url, args, force) + installer::install(flags, &module_url, args, name, root, force) .map_err(ErrBox::from) } @@ -583,13 +583,14 @@ pub fn main() { } DenoSubcommand::Info { file } => info_command(flags, file).boxed_local(), DenoSubcommand::Install { - root, - exe_name, module_url, args, + name, + root, force, - } => install_command(flags, root, exe_name, module_url, args, force) - .boxed_local(), + } => { + install_command(flags, module_url, args, name, root, force).boxed_local() + } DenoSubcommand::Repl => run_repl(flags).boxed_local(), DenoSubcommand::Run { script } => run_command(flags, script).boxed_local(), DenoSubcommand::Test { |