From 9c2177026f5fac8464a610a426a974cf691b2a89 Mon Sep 17 00:00:00 2001 From: funkill2 Date: Mon, 18 Mar 2019 20:27:31 +0300 Subject: added setup environment --- crates/tools/src/main.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'crates/tools/src') diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs index 484858a1e..6583b700c 100644 --- a/crates/tools/src/main.rs +++ b/crates/tools/src/main.rs @@ -17,7 +17,10 @@ fn main() -> Result<()> { .subcommand(SubCommand::with_name("fuzz-tests")) .get_matches(); match matches.subcommand_name().expect("Subcommand must be specified") { - "install-code" => install_code_extension()?, + "install-code" => { + setup_environment()?; + install_code_extension()?; + } "gen-tests" => gen_tests(Overwrite)?, "gen-syntax" => generate(Overwrite)?, "format" => run_rustfmt(Overwrite)?, @@ -28,6 +31,14 @@ fn main() -> Result<()> { Ok(()) } +fn setup_environment() -> Result<()> { + if cfg!(target_os = "macos") { + vscode_path_helpers::append_vscode_path()?; + } + + Ok(()) +} + fn install_code_extension() -> Result<()> { run("cargo install --path crates/ra_lsp_server --force", ".")?; if cfg!(windows) { -- cgit v1.2.3