aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-02-18 13:32:19 +0000
committerKirill Bulatov <[email protected]>2020-02-18 14:12:37 +0000
commiteceaf94f1936436e33ae235ca65bf2a6d4f77da5 (patch)
tree83d42e6f014f80b84f9193e6b5c7c1e2aded9fa7 /xtask
parentb8ddcb0652f3ec8683023afc1e1f5166d6a712f4 (diff)
More manual clippy fixes
Diffstat (limited to 'xtask')
-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!(