From 94fb9ad6b3167e8b8073a09fcf0cb135f383d3d2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 17 Feb 2020 15:33:31 +0100 Subject: Fix extension name --- xtask/src/install.rs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'xtask/src/install.rs') 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}; use anyhow::{bail, format_err, Context, Result}; -use crate::not_bash::{ls, pushd, rm, run}; +use crate::not_bash::{pushd, run}; // Latest stable, feel free to send a PR if this lags behind. const REQUIRED_RUST_VERSION: u32 = 41; @@ -99,28 +99,20 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { run!("npm --version").context("`npm` is required to build the VS Code plugin")?; run!("npm install")?; - let vsix_pkg = { - rm("*.vsix")?; - run!("npm run package --scripts-prepend-node-path")?; - ls("*.vsix")?.pop().unwrap() - }; + run!("npm run package --scripts-prepend-node-path")?; let code = find_code(|bin| run!("{} --version", bin).is_ok())?; - run!("{} --install-extension {} --force", code, vsix_pkg.display())?; + run!("{} --install-extension rust-analyzer.vsix --force", code)?; installed_extensions = run!("{} --list-extensions", code; echo = false)?; } else { run!("cmd.exe /c npm --version") .context("`npm` is required to build the VS Code plugin")?; run!("cmd.exe /c npm install")?; - let vsix_pkg = { - rm("*.vsix")?; - run!("cmd.exe /c npm run package")?; - ls("*.vsix")?.pop().unwrap() - }; + run!("cmd.exe /c npm run package")?; let code = find_code(|bin| run!("cmd.exe /c {}.cmd --version", bin).is_ok())?; - run!(r"cmd.exe /c {}.cmd --install-extension {} --force", code, vsix_pkg.display())?; + run!(r"cmd.exe /c {}.cmd --install-extension rust-analyzer.vsix --force", code)?; installed_extensions = run!("cmd.exe /c {}.cmd --list-extensions", code; echo = false)?; } -- cgit v1.2.3