cargo update

This commit is contained in:
Felix Schütt
2022-11-21 15:35:35 +01:00
parent bb3de1fd0e
commit 83a4334c7c
2 changed files with 8 additions and 14 deletions

6
Cargo.lock generated
View File

@@ -3831,9 +3831,9 @@ dependencies = [
[[package]] [[package]]
name = "wapm-toml" name = "wapm-toml"
version = "0.3.2" version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a52a44eb6e8ede075e12c491bbe0422beee61febb23b86dbafda4badcf8db576" checksum = "bde48580008d83994e59db51dc23d200d91c06d6b82f59a955717d589dac29b5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"semver 1.0.14", "semver 1.0.14",
@@ -4154,7 +4154,7 @@ dependencies = [
"unix_mode", "unix_mode",
"url", "url",
"walkdir", "walkdir",
"wapm-toml 0.3.2", "wapm-toml 0.3.3",
"wasmer", "wasmer",
"wasmer-cache", "wasmer-cache",
"wasmer-compiler", "wasmer-compiler",

View File

@@ -16,9 +16,9 @@ pub struct Init {
/// Initialize an empty wapm.toml /// Initialize an empty wapm.toml
#[clap(long, name = "empty")] #[clap(long, name = "empty")]
pub empty: bool, pub empty: bool,
/// If the `manifest-dir` contains a Cargo.toml, use that file to initialize the wapm.toml /// If the `manifest-path` is a Cargo.toml, use that file to initialize the wapm.toml
#[clap(long, name = "manifest-dir")] #[clap(long, name = "manifest-path")]
pub manifest_dir: Option<PathBuf>, pub manifest_path: Option<PathBuf>,
/// Directory of the output file name. wasmer init will error in the target dir already contains a wapm.toml /// Directory of the output file name. wasmer init will error in the target dir already contains a wapm.toml
#[clap(long, short = 'o', name = "out")] #[clap(long, short = 'o', name = "out")]
pub out: Option<PathBuf>, pub out: Option<PathBuf>,
@@ -99,14 +99,8 @@ impl Init {
// See if the directory has a Cargo.toml file, if yes, copy the license / readme, etc. // See if the directory has a Cargo.toml file, if yes, copy the license / readme, etc.
let cargo_toml = MetadataCommand::new() let cargo_toml = MetadataCommand::new()
.manifest_path(match self.manifest_dir.as_ref() { .manifest_path(match self.manifest_path.as_ref() {
Some(s) => { Some(s) => s.clone(),
if format!("{}", s.display()).ends_with("Cargo.toml") {
s.clone()
} else {
s.join("Cargo.toml")
}
}
None => Path::new("./Cargo.toml").to_path_buf(), None => Path::new("./Cargo.toml").to_path_buf(),
}) })
.features(CargoOpt::AllFeatures) .features(CargoOpt::AllFeatures)