From 8e8b6e7f628824d8bf5a50f6b8d445447c000830 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 26 Oct 2019 17:12:56 +0300 Subject: warn if npm is not found --- xtask/src/main.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xtask/src/main.rs') diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 06aa3c8ec..eb39bf715 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -159,6 +159,17 @@ fn fix_path_for_mac() -> Result<()> { } fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { + let npm_version = Cmd { + unix: r"npm --version", + windows: r"cmd.exe /c npm.cmd --version", + work_dir: "./editors/code", + } + .run(); + + if npm_version.is_err() { + eprintln!("\nERROR: `npm --version` failed, `npm` is required to build the VS Code plugin") + } + Cmd { unix: r"npm ci", windows: r"cmd.exe /c npm.cmd ci", work_dir: "./editors/code" }.run()?; Cmd { unix: r"npm run package", -- cgit v1.2.3