aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/install.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-17 14:33:31 +0000
committerAleksey Kladov <[email protected]>2020-02-17 14:35:06 +0000
commit94fb9ad6b3167e8b8073a09fcf0cb135f383d3d2 (patch)
tree89291f15bc0f6208e8f31e9a57b34a11e77ad1e4 /xtask/src/install.rs
parent13d793929a8f7732a586cc2f8a2322f2c02fd582 (diff)
Fix extension name
Diffstat (limited to 'xtask/src/install.rs')
-rw-r--r--xtask/src/install.rs18
1 files changed, 5 insertions, 13 deletions
diff --git a/xtask/src/install.rs b/xtask/src/install.rs
index 00bbabce4..91426377f 100644
--- a/xtask/src/install.rs
+++ b/xtask/src/install.rs
@@ -4,7 +4,7 @@ use std::{env, path::PathBuf, str};
4 4
5use anyhow::{bail, format_err, Context, Result}; 5use anyhow::{bail, format_err, Context, Result};
6 6
7use crate::not_bash::{ls, pushd, rm, run}; 7use crate::not_bash::{pushd, run};
8 8
9// Latest stable, feel free to send a PR if this lags behind. 9// Latest stable, feel free to send a PR if this lags behind.
10const REQUIRED_RUST_VERSION: u32 = 41; 10const REQUIRED_RUST_VERSION: u32 = 41;
@@ -99,28 +99,20 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> {
99 run!("npm --version").context("`npm` is required to build the VS Code plugin")?; 99 run!("npm --version").context("`npm` is required to build the VS Code plugin")?;
100 run!("npm install")?; 100 run!("npm install")?;
101 101
102 let vsix_pkg = { 102 run!("npm run package --scripts-prepend-node-path")?;
103 rm("*.vsix")?;
104 run!("npm run package --scripts-prepend-node-path")?;
105 ls("*.vsix")?.pop().unwrap()
106 };
107 103
108 let code = find_code(|bin| run!("{} --version", bin).is_ok())?; 104 let code = find_code(|bin| run!("{} --version", bin).is_ok())?;
109 run!("{} --install-extension {} --force", code, vsix_pkg.display())?; 105 run!("{} --install-extension rust-analyzer.vsix --force", code)?;
110 installed_extensions = run!("{} --list-extensions", code; echo = false)?; 106 installed_extensions = run!("{} --list-extensions", code; echo = false)?;
111 } else { 107 } else {
112 run!("cmd.exe /c npm --version") 108 run!("cmd.exe /c npm --version")
113 .context("`npm` is required to build the VS Code plugin")?; 109 .context("`npm` is required to build the VS Code plugin")?;
114 run!("cmd.exe /c npm install")?; 110 run!("cmd.exe /c npm install")?;
115 111
116 let vsix_pkg = { 112 run!("cmd.exe /c npm run package")?;
117 rm("*.vsix")?;
118 run!("cmd.exe /c npm run package")?;
119 ls("*.vsix")?.pop().unwrap()
120 };
121 113
122 let code = find_code(|bin| run!("cmd.exe /c {}.cmd --version", bin).is_ok())?; 114 let code = find_code(|bin| run!("cmd.exe /c {}.cmd --version", bin).is_ok())?;
123 run!(r"cmd.exe /c {}.cmd --install-extension {} --force", code, vsix_pkg.display())?; 115 run!(r"cmd.exe /c {}.cmd --install-extension rust-analyzer.vsix --force", code)?;
124 installed_extensions = run!("cmd.exe /c {}.cmd --list-extensions", code; echo = false)?; 116 installed_extensions = run!("cmd.exe /c {}.cmd --list-extensions", code; echo = false)?;
125 } 117 }
126 118