From 7cf2c0d46ffc68ccc08e50866df0a0e92de4ff1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my?= Date: Tue, 8 Dec 2020 19:23:25 +0100 Subject: Add client install support for `code-exploration` build. --- xtask/src/install.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'xtask') diff --git a/xtask/src/install.rs b/xtask/src/install.rs index 78a8af797..12962bcfa 100644 --- a/xtask/src/install.rs +++ b/xtask/src/install.rs @@ -16,6 +16,7 @@ pub struct InstallCmd { #[derive(Clone, Copy)] pub enum ClientOpt { VsCode, + VsCodeExploration, VsCodeInsiders, VsCodium, VsCodeOss, @@ -26,10 +27,11 @@ impl ClientOpt { pub const fn as_cmds(&self) -> &'static [&'static str] { match self { ClientOpt::VsCode => &["code"], + ClientOpt::VsCodeExploration => &["code-exploration"], ClientOpt::VsCodeInsiders => &["code-insiders"], ClientOpt::VsCodium => &["codium"], ClientOpt::VsCodeOss => &["code-oss"], - ClientOpt::Any => &["code", "code-insiders", "codium", "code-oss"], + ClientOpt::Any => &["code", "code-exploration", "code-insiders", "codium", "code-oss"], } } } @@ -44,11 +46,17 @@ impl std::str::FromStr for ClientOpt { type Err = anyhow::Error; fn from_str(s: &str) -> Result { - [ClientOpt::VsCode, ClientOpt::VsCodeInsiders, ClientOpt::VsCodium, ClientOpt::VsCodeOss] - .iter() - .copied() - .find(|c| [s] == c.as_cmds()) - .ok_or_else(|| anyhow::format_err!("no such client")) + [ + ClientOpt::VsCode, + ClientOpt::VsCodeExploration, + ClientOpt::VsCodeInsiders, + ClientOpt::VsCodium, + ClientOpt::VsCodeOss, + ] + .iter() + .copied() + .find(|c| [s] == c.as_cmds()) + .ok_or_else(|| anyhow::format_err!("no such client")) } } -- cgit v1.2.3