aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/install.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/xtask/src/install.rs b/xtask/src/install.rs
index cc6fecc85..3df021acc 100644
--- a/xtask/src/install.rs
+++ b/xtask/src/install.rs
@@ -94,8 +94,7 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> {
94 }) 94 })
95 }; 95 };
96 96
97 let installed_extensions; 97 let installed_extensions = if cfg!(unix) {
98 if cfg!(unix) {
99 run!("npm --version").context("`npm` is required to build the VS Code plugin")?; 98 run!("npm --version").context("`npm` is required to build the VS Code plugin")?;
100 run!("npm install")?; 99 run!("npm install")?;
101 100
@@ -103,7 +102,7 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> {
103 102
104 let code = find_code(|bin| run!("{} --version", bin).is_ok())?; 103 let code = find_code(|bin| run!("{} --version", bin).is_ok())?;
105 run!("{} --install-extension rust-analyzer.vsix --force", code)?; 104 run!("{} --install-extension rust-analyzer.vsix --force", code)?;
106 installed_extensions = run!("{} --list-extensions", code; echo = false)?; 105 run!("{} --list-extensions", code; echo = false)?
107 } else { 106 } else {
108 run!("cmd.exe /c npm --version") 107 run!("cmd.exe /c npm --version")
109 .context("`npm` is required to build the VS Code plugin")?; 108 .context("`npm` is required to build the VS Code plugin")?;
@@ -113,8 +112,8 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> {
113 112
114 let code = find_code(|bin| run!("cmd.exe /c {}.cmd --version", bin).is_ok())?; 113 let code = find_code(|bin| run!("cmd.exe /c {}.cmd --version", bin).is_ok())?;
115 run!(r"cmd.exe /c {}.cmd --install-extension rust-analyzer.vsix --force", code)?; 114 run!(r"cmd.exe /c {}.cmd --install-extension rust-analyzer.vsix --force", code)?;
116 installed_extensions = run!("cmd.exe /c {}.cmd --list-extensions", code; echo = false)?; 115 run!("cmd.exe /c {}.cmd --list-extensions", code; echo = false)?
117 } 116 };
118 117
119 if !installed_extensions.contains("rust-analyzer") { 118 if !installed_extensions.contains("rust-analyzer") {
120 bail!( 119 bail!(