summaryrefslogtreecommitdiff
path: root/cli/lib.rs
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2020-02-08 00:49:55 -0800
committerGitHub <noreply@github.com>2020-02-08 09:49:55 +0100
commit619a24390ff15d5ea5e577a4d0391823f94e8592 (patch)
tree25be718dce5df73964b70c7251a345243d87067d /cli/lib.rs
parentf650c3edb3081ac0433b338c0c99418171656dd1 (diff)
install: add --force flag and remove yes/no prompt (#3917)
Diffstat (limited to 'cli/lib.rs')
-rw-r--r--cli/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/lib.rs b/cli/lib.rs
index a8a314f32..e752d6f2a 100644
--- a/cli/lib.rs
+++ b/cli/lib.rs
@@ -262,6 +262,7 @@ async fn install_command(
exe_name: String,
module_url: String,
args: Vec<String>,
+ force: bool,
) {
// Firstly fetch and compile module, this
// ensures the module exists.
@@ -270,7 +271,7 @@ async fn install_command(
fetch_command(fetch_flags, vec![module_url.to_string()]).await;
let install_result =
- installer::install(flags, dir, &exe_name, &module_url, args);
+ installer::install(flags, dir, &exe_name, &module_url, args, force);
if let Err(e) = install_result {
print_msg_and_exit(&e.to_string());
}
@@ -447,7 +448,8 @@ pub fn main() {
exe_name,
module_url,
args,
- } => install_command(flags, dir, exe_name, module_url, args).await,
+ force,
+ } => install_command(flags, dir, exe_name, module_url, args, force).await,
DenoSubcommand::Repl => run_repl(flags).await,
DenoSubcommand::Run { script } => run_script(flags, script).await,
DenoSubcommand::Types => types_command(),