Skip to content

Commit

Permalink
Allow colons in Windows host paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mrowqa committed Aug 5, 2019
1 parent 265bc31 commit 2758d2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wasmtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Options:
--preload=<wasm> load an additional wasm module before loading the main module
--env=<env> pass an environment variable (\"key=value\") to the program
--dir=<dir> grant access to the given host directory
--mapdir=<mapping> where <mapping> has the form <wasmdir>:<hostdir>, grant access to
--mapdir=<mapping> where <mapping> has the form <wasmdir>::<hostdir>, grant access to
the given host directory with the given wasm directory name
-h, --help print this help message
--version print the Cranelift version
Expand Down Expand Up @@ -135,9 +135,9 @@ fn compute_preopen_dirs(flag_dir: &[String], flag_mapdir: &[String]) -> Vec<(Str
}

for mapdir in flag_mapdir {
let parts: Vec<&str> = mapdir.split(':').collect();
let parts: Vec<&str> = mapdir.split("::").collect();
if parts.len() != 2 {
println!("--mapdir argument must contain exactly one colon, separating a guest directory name and a host directory name");
println!("--mapdir argument must contain exactly one double colon ('::'), separating a guest directory name and a host directory name");
exit(1);
}
let (key, value) = (parts[0], parts[1]);
Expand Down

0 comments on commit 2758d2f

Please sign in to comment.