From 87af0609b788566eb871a10d13fb919c452821ce Mon Sep 17 00:00:00 2001 From: damirka Date: Tue, 13 Jul 2021 13:41:38 +0300 Subject: [PATCH] install -> fetch --- leo/commands/package/{install.rs => fetch.rs} | 8 ++++---- leo/commands/package/mod.rs | 4 ++-- leo/main.rs | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) rename leo/commands/package/{install.rs => fetch.rs} (95%) diff --git a/leo/commands/package/install.rs b/leo/commands/package/fetch.rs similarity index 95% rename from leo/commands/package/install.rs rename to leo/commands/package/fetch.rs index 18419557a8..4c8c9d9d4e 100644 --- a/leo/commands/package/install.rs +++ b/leo/commands/package/fetch.rs @@ -27,15 +27,15 @@ use tracing::span::Span; /// Install dependencies Leo code command #[derive(StructOpt, Debug)] #[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Install {} +pub struct Fetch {} -impl Command for Install { +impl Command for Fetch { /// Names of dependencies in the current branch of a dependency tree. type Input = IndexSet; type Output = (); fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Installing") + tracing::span!(tracing::Level::INFO, "Fetching") } fn prelude(&self, context: Context) -> Result { @@ -88,7 +88,7 @@ impl Command for Install { // Run the same command for installed dependency. let mut new_context = context.clone(); new_context.path = Some(path); - (Install {}).apply(new_context, tree.clone())?; + (Fetch {}).apply(new_context, tree.clone())?; } Ok(()) diff --git a/leo/commands/package/mod.rs b/leo/commands/package/mod.rs index 434b9dbd47..cd1c3ccd69 100644 --- a/leo/commands/package/mod.rs +++ b/leo/commands/package/mod.rs @@ -20,8 +20,8 @@ pub use add::Add; pub mod clone; pub use clone::Clone; -pub mod install; -pub use install::Install; +pub mod fetch; +pub use fetch::Fetch; pub mod login; pub use login::Login; diff --git a/leo/main.rs b/leo/main.rs index bfb04d43f6..39613bf13c 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -22,7 +22,7 @@ pub mod logger; pub mod updater; use commands::{ - package::{Add, Clone, Install, Login, Logout, Publish, Remove}, + package::{Add, Clone, Fetch, Login, Logout, Publish, Remove}, Build, Clean, Command, @@ -138,9 +138,9 @@ enum CommandOpts { }, #[structopt(about = "Install dependencies for this program")] - Install { + Fetch { #[structopt(flatten)] - command: Install, + command: Fetch, }, #[structopt(about = "Clone a package from the Aleo Package Manager")] @@ -220,7 +220,7 @@ fn run_with_args(opt: Opt) -> Result<(), Error> { CommandOpts::Update { command } => command.try_execute(context), CommandOpts::Add { command } => command.try_execute(context), - CommandOpts::Install { command } => command.try_execute(context), + CommandOpts::Fetch { command } => command.try_execute(context), CommandOpts::Clone { command } => command.try_execute(context), CommandOpts::Login { command } => command.try_execute(context), CommandOpts::Logout { command } => command.try_execute(context),