From d0bb051ef7a2cfb4cc1d26e2cf981c4e345269e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Sat, 17 Oct 2020 00:35:06 +0200 Subject: allow xtask install --client-code[=CLIENT] to specify client --- xtask/src/main.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'xtask/src/main.rs') diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 97e5dcd4e..62124041d 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -16,7 +16,7 @@ use xshell::pushd; use xtask::{ codegen::{self, Mode}, dist::DistCmd, - install::{ClientOpt, InstallCmd, Malloc, ServerOpt}, + install::{InstallCmd, Malloc, ServerOpt}, metrics::MetricsCmd, pre_cache::PreCacheCmd, pre_commit, project_root, @@ -46,10 +46,11 @@ USAGE: cargo xtask install [FLAGS] FLAGS: - --client-code Install only VS Code plugin - --server Install only the language server - --mimalloc Use mimalloc for server - -h, --help Prints help information + --client-code[=CLIENT] Install only VS Code plugin. + CLIENT is one of 'code', 'code-insiders', 'codium', or 'code-oss' + --server Install only the language server + --mimalloc Use mimalloc for server + -h, --help Prints help information " ); return Ok(()); @@ -67,10 +68,12 @@ FLAGS: let malloc = if args.contains("--mimalloc") { Malloc::Mimalloc } else { Malloc::System }; + let client_opt = args.opt_value_from_str("--client-code")?; + args.finish()?; InstallCmd { - client: if server { None } else { Some(ClientOpt::VsCode) }, + client: if server { None } else { Some(client_opt.unwrap_or_default()) }, server: if client_code { None } else { Some(ServerOpt { malloc }) }, } .run() -- cgit v1.2.3