Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename os_version to os.version #163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/image/descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,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<String>,
/// This OPTIONAL property specifies an array of strings, each
Expand Down
2 changes: 2 additions & 0 deletions src/image/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I ask you to create another commit or PR about this change?

"dragonfly" => Os::DragonFlyBSD,
"freebsd" => Os::FreeBSD,
"hurd" => Os::Hurd,
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,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()
);
}
Expand All @@ -310,7 +310,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()
);
}
Expand Down
Loading