Use Z option for docker-run volume mount
This is necessary on systems with SELinux to prevent file permission/access errors when building WASM output * cli/src/wasm.rs: Use Z volume mount option for docker-run * script/build-wasm: Likewise.
This commit is contained in:
parent
83f0ea80cf
commit
71d96e813f
2 changed files with 3 additions and 3 deletions
|
|
@ -33,12 +33,12 @@ pub fn compile_language_to_wasm(language_dir: &Path, force_docker: bool) -> Resu
|
|||
let mut volume_string;
|
||||
if let (Some(parent), Some(filename)) = (language_dir.parent(), language_dir.file_name()) {
|
||||
volume_string = OsString::from(parent);
|
||||
volume_string.push(":/src");
|
||||
volume_string.push(":/src:Z");
|
||||
command.arg("--workdir");
|
||||
command.arg(&Path::new("/src").join(filename));
|
||||
} else {
|
||||
volume_string = OsString::from(language_dir);
|
||||
volume_string.push(":/src");
|
||||
volume_string.push(":/src:Z");
|
||||
command.args(&["--workdir", "/src"]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue