amoeba commented on code in PR #37727:
URL: https://github.com/apache/arrow/pull/37727#discussion_r1326608502


##########
r/tools/nixlibs.R:
##########
@@ -473,17 +473,20 @@ build_libarrow <- function(src_dir, dst_dir) {
   env_vars <- env_vars_as_string(env_var_list)
 
   cat("**** arrow", ifelse(quietly, "", paste("with", env_vars)), "\n")
-  status <- suppressWarnings(system(
-    paste(env_vars, "inst/build_arrow_static.sh"),
-    ignore.stdout = quietly, ignore.stderr = quietly
+
+  status <- suppressWarnings(system2(
+    "bash",

Review Comment:
   @nealrichardson, Re:
   
   > I'm not sure you need this, we didn't before.
   
   Were you referring to how I broke up the args in the system2 call? Calling 
the script the old way does work with `system` but we switched to `system2 `to 
capture stdin/stdout and calling system2 the same way resulted in this error,
   
   > sh: SOURCE_DIR='../cpp' 
BUILD_DIR='/var/folders/vm/bbcxtl3s63l7gn9h1tvfh1mm0000gn/T//RtmpoTYnF4/file166a06be38857'
 DEST_DIR='libarrow/arrow-13.0.0.9000' CMAKE='/opt/homebrew/bin/cmake' 
EXTRA_CMAKE_FLAGS='' CC='clang -arch arm64' CXX='clang++ -arch arm64 
-std=gnu++17' LDFLAGS='-L/opt/R/arm64/lib' N_JOBS='2' ARROW_S3='OFF' 
ARROW_GCS='OFF' inst/build_arrow_static.sh: No such file or directory
   
   I think this is because of what the man page for `system2` says, which is:
   
   > Unlike [system](http://127.0.0.1:17041/help/library/base/help/system), 
command is always quoted by 
[shQuote](http://127.0.0.1:17041/help/library/base/help/shQuote), so it must be 
a single command without arguments.
   
   So I felt like my change to the args made sense.



-- 
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