File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ pub struct Platform {
102102 /// manifests where os.version is not known to work with the host OS
103103 /// version. Valid values are implementation-defined. e.g.
104104 /// 10.0.14393.1066 on windows.
105- #[ serde( skip_serializing_if = "Option::is_none" ) ]
105+ #[ serde( rename = "os.version" , skip_serializing_if = "Option::is_none" ) ]
106106 #[ builder( default ) ]
107107 os_version : Option < String > ,
108108 /// This OPTIONAL property specifies an array of strings, each
Original file line number Diff line number Diff line change @@ -231,6 +231,8 @@ impl From<&str> for Os {
231231 "aix" => Os :: AIX ,
232232 "android" => Os :: Android ,
233233 "darwin" => Os :: Darwin ,
234+ // std::env::consts::OS returns "macos" instead of darwin
235+ "macos" => Os :: Darwin ,
234236 "dragonfly" => Os :: DragonFlyBSD ,
235237 "freebsd" => Os :: FreeBSD ,
236238 "hurd" => Os :: Hurd ,
Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ mod tests {
295295 . expect ( "failed to canonicalize rootfs" ) ;
296296
297297 assert_eq ! (
298- & rootfs_absolute_path,
298+ & rootfs_absolute_path. canonicalize ( ) . unwrap ( ) ,
299299 spec. root. expect( "no root in spec" ) . path( )
300300 ) ;
301301 }
@@ -310,7 +310,7 @@ mod tests {
310310 . expect ( "failed to canonicalize rootfs" ) ;
311311
312312 assert_eq ! (
313- & rootfs_absolute_path,
313+ & rootfs_absolute_path. canonicalize ( ) . unwrap ( ) ,
314314 spec. root. expect( "no root in spec" ) . path( )
315315 ) ;
316316 }
You can’t perform that action at this time.
0 commit comments