aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
Diffstat (limited to 'xtask')
-rw-r--r--xtask/Cargo.toml8
-rw-r--r--xtask/src/install.rs9
2 files changed, 8 insertions, 9 deletions
diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml
index 72dd5e581..a8b9b010d 100644
--- a/xtask/Cargo.toml
+++ b/xtask/Cargo.toml
@@ -9,8 +9,8 @@ publish = false
9doctest = false 9doctest = false
10 10
11[dependencies] 11[dependencies]
12walkdir = "2.1.3" 12walkdir = "2.3.1"
13pico-args = "0.3.0" 13pico-args = "0.3.1"
14quote = "1.0.2" 14quote = "1.0.2"
15proc-macro2 = "1.0.1" 15proc-macro2 = "1.0.8"
16anyhow = "1.0.19" 16anyhow = "1.0.26"
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!(