Merge pull request #739 from peterhuene/use-clap-for-cli

Use structopt instead of docopt.
This commit is contained in:
Peter Huene
2020-01-07 13:44:39 -08:00
committed by GitHub
14 changed files with 903 additions and 891 deletions

View File

@@ -25,8 +25,6 @@ region = "2.0.0"
[dev-dependencies]
# for wasmtime.rs
wasi-common = { path = "../wasi-common" }
docopt = "1.0.1"
serde = { "version" = "1.0.94", features = ["derive"] }
pretty_env_logger = "0.3.0"
wasmtime-wast = { path = "../wast" }
wasmtime-wasi = { path = "../wasi" }

View File

@@ -151,7 +151,7 @@ pub fn create_new_config<P: AsRef<Path> + Debug>(config_file: Option<P>) -> Resu
if config_file.exists() {
bail!(
"Specified config file already exists! Path: {}",
"Configuration file '{}' already exists.",
config_file.display()
);
}
@@ -193,7 +193,7 @@ lazy_static! {
ProjectDirs::from("", "BytecodeAlliance", "wasmtime");
static ref DEFAULT_CONFIG_PATH: Result<PathBuf, String> = PROJECT_DIRS
.as_ref()
.map(|proj_dirs| proj_dirs.config_dir().join("wasmtime-cache-config.toml"))
.map(|proj_dirs| proj_dirs.config_dir().join("config.toml"))
.ok_or_else(|| "Config file not specified and failed to get the default".to_string());
}