added setup environment

This commit is contained in:
funkill2
2019-03-18 20:27:31 +03:00
parent d8f3b0d01d
commit 9c2177026f

View File

@@ -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) {