aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tools/src')
-rw-r--r--crates/tools/src/main.rs13
1 files changed, 12 insertions, 1 deletions
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<()> {
17 .subcommand(SubCommand::with_name("fuzz-tests")) 17 .subcommand(SubCommand::with_name("fuzz-tests"))
18 .get_matches(); 18 .get_matches();
19 match matches.subcommand_name().expect("Subcommand must be specified") { 19 match matches.subcommand_name().expect("Subcommand must be specified") {
20 "install-code" => install_code_extension()?, 20 "install-code" => {
21 setup_environment()?;
22 install_code_extension()?;
23 }
21 "gen-tests" => gen_tests(Overwrite)?, 24 "gen-tests" => gen_tests(Overwrite)?,
22 "gen-syntax" => generate(Overwrite)?, 25 "gen-syntax" => generate(Overwrite)?,
23 "format" => run_rustfmt(Overwrite)?, 26 "format" => run_rustfmt(Overwrite)?,
@@ -28,6 +31,14 @@ fn main() -> Result<()> {
28 Ok(()) 31 Ok(())
29} 32}
30 33
34fn setup_environment() -> Result<()> {
35 if cfg!(target_os = "macos") {
36 vscode_path_helpers::append_vscode_path()?;
37 }
38
39 Ok(())
40}
41
31fn install_code_extension() -> Result<()> { 42fn install_code_extension() -> Result<()> {
32 run("cargo install --path crates/ra_lsp_server --force", ".")?; 43 run("cargo install --path crates/ra_lsp_server --force", ".")?;
33 if cfg!(windows) { 44 if cfg!(windows) {