alexyin1 commented on code in PR #489:
URL: https://github.com/apache/iceberg-rust/pull/489#discussion_r1695784467


##########
crates/test_utils/src/docker.rs:
##########
@@ -40,15 +41,28 @@ impl DockerCompose {
         self.project_name.as_str()
     }
 
+    // docker/podman do not consistently place OSArch in the same json path 
across OS and versions
+    // below function tries two common places then gives up
     fn get_os_arch() -> String {
         let mut cmd = Command::new("docker");
         cmd.arg("info")
             .arg("--format")
             .arg("{{.OSType}}/{{.Architecture}}");
 
-        get_cmd_output(cmd, "Get os arch".to_string())
-            .trim()
-            .to_string()
+        let result = get_cmd_output_dont_panic(cmd, "Get os arch".to_string());
+        match result {
+            Ok(value) => value.trim().to_string(),
+            Err(_err) => {
+                let mut alt_cmd = Command::new("docker");

Review Comment:
   Fixed, moved comment to this line 
https://github.com/apache/iceberg-rust/pull/489/commits/4d34a0dcf61850080ae095748bdae460aa2aaf41



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to