Merge pull request #1180 from CyberShadow/pull-20210618-110411

Pin emscripten/emsdk Docker version
This commit is contained in:
Max Brunsfeld 2021-06-29 15:45:24 -07:00 committed by GitHub
commit e7d3b29470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 8 deletions

View file

@ -6,6 +6,8 @@ use std::path::Path;
use std::process::Command;
use which::which;
const EMSCRIPTEN_TAG: &'static str = concat!("emscripten/emsdk:", env!("EMSCRIPTEN_VERSION"));
pub fn get_grammar_name(src_dir: &Path) -> Result<String> {
let grammar_json_path = src_dir.join("grammar.json");
let grammar_json = fs::read_to_string(&grammar_json_path)
@ -61,7 +63,7 @@ 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/emsdk", "emcc"]);
command.args(&[EMSCRIPTEN_TAG, "emcc"]);
} else {
return Err(anyhow!(
"You must have either emcc or docker on your PATH to run this command"