thisisnic commented on code in PR #37961:
URL: https://github.com/apache/arrow/pull/37961#discussion_r1342634870


##########
r/R/install-arrow.R:
##########
@@ -61,6 +61,7 @@ install_arrow <- function(nightly = FALSE,
                           verbose = Sys.getenv("ARROW_R_DEV", FALSE),
                           repos = getOption("repos"),
                           ...) {
+  sysname <- tolower(Sys.info()[["sysname"]])

Review Comment:
   ```suggestion
   ```



##########
r/R/install-arrow.R:
##########
@@ -79,7 +80,8 @@ install_arrow <- function(nightly = FALSE,
     # On the M1, we can't use the usual autobrew, which pulls Intel 
dependencies
     apple_m1 <- grepl("arm-apple|aarch64.*darwin", R.Version()$platform)
     # On Rosetta, we have to build without JEMALLOC, so we also can't autobrew
-    if (on_rosetta()) {
+    rosetta <- identical(sysname, "darwin") && identical(system("sysctl -n 
sysctl.proc_translated", intern = TRUE), "1")
+    if (rosetta) {

Review Comment:
   ```suggestion
       rosetta <- on_rosetta()
       if (rosetta) {
   ```
   
   Another PR implemented a function `on_rosetta()` that already does these 
checks, so we can simplify this bit here, and remove the creation of the 
`sysname` variable above.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to