fix installation for windows

This commit is contained in:
Aleksey Kladov 2018-09-16 00:02:25 +01:00
parent 722706fe41
commit 5b70e5cf0c

View file

@ -191,9 +191,17 @@ fn existing_tests(dir: &Path) -> Result<HashMap<String, (PathBuf, Test)>> {
fn install_code_extension() -> Result<()> { fn install_code_extension() -> Result<()> {
run("cargo install --path crates/server --force", ".")?; run("cargo install --path crates/server --force", ".")?;
if cfg!(windows) {
run(r"cmd.exe /c npm.cmd install", "./code")?;
} else {
run(r"npm install", "./code")?; run(r"npm install", "./code")?;
run(r"./node_modules/vsce/out/vsce package", "./code")?; }
run(r"node ./node_modules/vsce/out/vsce package", "./code")?;
if cfg!(windows) {
run(r"cmd.exe /c code.cmd --install-extension ./rcf-lsp-0.0.1.vsix", "./code")?;
} else {
run(r"code --install-extension ./rcf-lsp-0.0.1.vsix", "./code")?; run(r"code --install-extension ./rcf-lsp-0.0.1.vsix", "./code")?;
}
Ok(()) Ok(())
} }