diff options
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs index ba16ea590..9176aca6f 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -53,6 +53,7 @@ use crate::flags::LintFlags; use crate::flags::ReplFlags; use crate::flags::RunFlags; use crate::flags::TestFlags; +use crate::flags::UninstallFlags; use crate::flags::UpgradeFlags; use crate::fmt_errors::PrettyJsError; use crate::module_loader::CliModuleLoader; @@ -487,6 +488,12 @@ async fn install_command( ) } +async fn uninstall_command( + uninstall_flags: UninstallFlags, +) -> Result<(), AnyError> { + tools::installer::uninstall(uninstall_flags.name, uninstall_flags.root) +} + async fn lsp_command() -> Result<(), AnyError> { lsp::start().await } @@ -1149,6 +1156,9 @@ fn get_subcommand( DenoSubcommand::Install(install_flags) => { install_command(flags, install_flags).boxed_local() } + DenoSubcommand::Uninstall(uninstall_flags) => { + uninstall_command(uninstall_flags).boxed_local() + } DenoSubcommand::Lsp => lsp_command().boxed_local(), DenoSubcommand::Lint(lint_flags) => { lint_command(flags, lint_flags).boxed_local() |