From 5b70e5cf0c96c1de02b86b535ab8441f1e1b0d32 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 16 Sep 2018 00:02:25 +0100 Subject: fix installation for windows --- crates/tools/src/main.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs index 3f9caa4be..597d07d80 100644 --- a/crates/tools/src/main.rs +++ b/crates/tools/src/main.rs @@ -191,9 +191,17 @@ fn existing_tests(dir: &Path) -> Result> { fn install_code_extension() -> Result<()> { run("cargo install --path crates/server --force", ".")?; - run(r"npm install", "./code")?; - run(r"./node_modules/vsce/out/vsce package", "./code")?; - run(r"code --install-extension ./rcf-lsp-0.0.1.vsix", "./code")?; + if cfg!(windows) { + run(r"cmd.exe /c npm.cmd install", "./code")?; + } else { + run(r"npm install", "./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")?; + } Ok(()) } -- cgit v1.2.3