diff --git a/src/image/descriptor.rs b/src/image/descriptor.rs index 876b2ddfc3..c4b126c625 100644 --- a/src/image/descriptor.rs +++ b/src/image/descriptor.rs @@ -86,7 +86,7 @@ pub struct Platform { /// manifests where os.version is not known to work with the host OS /// version. Valid values are implementation-defined. e.g. /// 10.0.14393.1066 on windows. - #[serde(skip_serializing_if = "Option::is_none")] + #[serde(rename = "os.version", skip_serializing_if = "Option::is_none")] #[builder(default)] os_version: Option, /// This OPTIONAL property specifies an array of strings, each diff --git a/src/image/mod.rs b/src/image/mod.rs index 3a2ef2b973..9bbbb506b6 100644 --- a/src/image/mod.rs +++ b/src/image/mod.rs @@ -193,6 +193,8 @@ impl From<&str> for Os { "aix" => Os::AIX, "android" => Os::Android, "darwin" => Os::Darwin, + // std::env::consts::OS returns "macos" instead of darwin + "macos" => Os::Darwin, "dragonfly" => Os::DragonFlyBSD, "freebsd" => Os::FreeBSD, "hurd" => Os::Hurd, diff --git a/src/runtime/mod.rs b/src/runtime/mod.rs index 69647668a2..4aac4a7353 100644 --- a/src/runtime/mod.rs +++ b/src/runtime/mod.rs @@ -260,6 +260,7 @@ impl Spec { P: AsRef, { Ok(if path.as_ref().is_absolute() { + println!("Other: {}", path.as_ref().display()); fs::canonicalize(path.as_ref())? } else { let canonical_bundle_path = fs::canonicalize(&bundle)?; @@ -298,7 +299,7 @@ mod tests { .expect("failed to canonicalize rootfs"); assert_eq!( - &rootfs_absolute_path, + &rootfs_absolute_path.canonicalize().unwrap(), spec.root.expect("no root in spec").path() ); } @@ -313,7 +314,7 @@ mod tests { .expect("failed to canonicalize rootfs"); assert_eq!( - &rootfs_absolute_path, + &rootfs_absolute_path.canonicalize().unwrap(), spec.root.expect("no root in spec").path() ); }