Skip to content

Commit 9145b97

Browse files
bors[bot]derdaele
andauthored
Merge #6766
6766: Add client install support for `code-exploration` builds. r=lnicola a=derdaele VSCode has a feature to install the command to the PATH. <img width="640" alt="Capture d’écran 2020-12-08 à 19 25 43" src="https://user-images.githubusercontent.com/16373039/101525141-2e013300-398b-11eb-8d07-60a92ae9587c.png"> `code-exploration` is the command name for the ARM64 experimental build. As of today, this is the only build running natively on Apple Silicon. See _ARM64_ Experimental in https://code.visualstudio.com/insiders/#osx. The `-exploration` prefix seems pretty undocumented, my understanding of it is that it is an insider-like version that uses a different electron version (in this case, maybe the election version that was recently ported to Apple Silicon?). Co-authored-by: Jérémy <[email protected]>
2 parents 70fa57f + 7cf2c0d commit 9145b97

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

xtask/src/install.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub struct InstallCmd {
1616
#[derive(Clone, Copy)]
1717
pub enum ClientOpt {
1818
VsCode,
19+
VsCodeExploration,
1920
VsCodeInsiders,
2021
VsCodium,
2122
VsCodeOss,
@@ -26,10 +27,11 @@ impl ClientOpt {
2627
pub const fn as_cmds(&self) -> &'static [&'static str] {
2728
match self {
2829
ClientOpt::VsCode => &["code"],
30+
ClientOpt::VsCodeExploration => &["code-exploration"],
2931
ClientOpt::VsCodeInsiders => &["code-insiders"],
3032
ClientOpt::VsCodium => &["codium"],
3133
ClientOpt::VsCodeOss => &["code-oss"],
32-
ClientOpt::Any => &["code", "code-insiders", "codium", "code-oss"],
34+
ClientOpt::Any => &["code", "code-exploration", "code-insiders", "codium", "code-oss"],
3335
}
3436
}
3537
}
@@ -44,11 +46,17 @@ impl std::str::FromStr for ClientOpt {
4446
type Err = anyhow::Error;
4547

4648
fn from_str(s: &str) -> Result<Self, Self::Err> {
47-
[ClientOpt::VsCode, ClientOpt::VsCodeInsiders, ClientOpt::VsCodium, ClientOpt::VsCodeOss]
48-
.iter()
49-
.copied()
50-
.find(|c| [s] == c.as_cmds())
51-
.ok_or_else(|| anyhow::format_err!("no such client"))
49+
[
50+
ClientOpt::VsCode,
51+
ClientOpt::VsCodeExploration,
52+
ClientOpt::VsCodeInsiders,
53+
ClientOpt::VsCodium,
54+
ClientOpt::VsCodeOss,
55+
]
56+
.iter()
57+
.copied()
58+
.find(|c| [s] == c.as_cmds())
59+
.ok_or_else(|| anyhow::format_err!("no such client"))
5260
}
5361
}
5462

0 commit comments

Comments
 (0)