diff options
author | Aleksey Kladov <[email protected]> | 2019-10-26 15:12:56 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-26 15:12:56 +0100 |
commit | 8e8b6e7f628824d8bf5a50f6b8d445447c000830 (patch) | |
tree | f44f876fc2f5adb2d62f93625ce5c050d8a8e7b2 /xtask/src | |
parent | e6cb06d2850b9b9c38c0c13d6948ab39adcd652e (diff) |
warn if npm is not found
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/main.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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<()> { | |||
159 | } | 159 | } |
160 | 160 | ||
161 | fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { | 161 | fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { |
162 | let npm_version = Cmd { | ||
163 | unix: r"npm --version", | ||
164 | windows: r"cmd.exe /c npm.cmd --version", | ||
165 | work_dir: "./editors/code", | ||
166 | } | ||
167 | .run(); | ||
168 | |||
169 | if npm_version.is_err() { | ||
170 | eprintln!("\nERROR: `npm --version` failed, `npm` is required to build the VS Code plugin") | ||
171 | } | ||
172 | |||
162 | Cmd { unix: r"npm ci", windows: r"cmd.exe /c npm.cmd ci", work_dir: "./editors/code" }.run()?; | 173 | Cmd { unix: r"npm ci", windows: r"cmd.exe /c npm.cmd ci", work_dir: "./editors/code" }.run()?; |
163 | Cmd { | 174 | Cmd { |
164 | unix: r"npm run package", | 175 | unix: r"npm run package", |