Make error message more specific

This commit is contained in:
Boris Verkhovskiy 2023-01-08 08:10:14 -07:00
parent 9ac55f79d1
commit 61b85b2664
2 changed files with 10 additions and 1 deletions

View file

@ -65,6 +65,11 @@ pub fn compile_language_to_wasm(language_dir: &Path, force_docker: bool) -> Resu
// Run `emcc` in a container using the `emscripten-slim` image
command.args(&[EMSCRIPTEN_TAG, "emcc"]);
} else {
if force_docker {
return Err(anyhow!(
"You must have docker on your PATH to run this command with --docker"
));
}
return Err(anyhow!(
"You must have either emcc or docker on your PATH to run this command"
));