This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 35e8136622 GH-46673: [CI][R][Docs] Accept empty INSTALL_ARGS again 
(#46682)
35e8136622 is described below

commit 35e8136622672b7677a5dbb6056e8c10d28115d2
Author: Hiroyuki Sato <[email protected]>
AuthorDate: Wed Jun 4 06:09:41 2025 +0900

    GH-46673: [CI][R][Docs] Accept empty INSTALL_ARGS again (#46682)
    
    ### Rationale for this change
    
    This PR fixes the bug introduced in #46527.
    
    If the environment variable `INSTALL_ARGS` doesn't set,
    the R command should execute,
    `CMD INSTALL arrow*tar.gz`.
    
    After #46527 change, It executed
    `CMD INSTALL '' arrow*tar.gz`
    
    ### What changes are included in this PR?
    
    Split `INSTALL_ARGS` to `R_INSTALL_ARGS` as array and use 
`"${R_INSTALL_ARGS[@]}"`.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #46673
    
    Lead-authored-by: Hiroyuki Sato <[email protected]>
    Co-authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 ci/scripts/r_build.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ci/scripts/r_build.sh b/ci/scripts/r_build.sh
index 63e6595bea..7554a9502f 100755
--- a/ci/scripts/r_build.sh
+++ b/ci/scripts/r_build.sh
@@ -24,6 +24,11 @@ build_dir=${2}
 
 : "${BUILD_DOCS_R:=OFF}"
 
+R_INSTALL_ARGS=()
+for arg in ${INSTALL_ARGS:-}; do
+  R_INSTALL_ARGS+=("${arg}")
+done
+
 # https://github.com/apache/arrow/issues/41429
 # TODO: We want to out-of-source build. This is a workaround. We copy
 # all needed files to the build directory from the source directory
@@ -42,7 +47,7 @@ fi
 ${SUDO} \
   env \
     PKG_CONFIG_PATH="${ARROW_HOME}/lib/pkgconfig:${PKG_CONFIG_PATH}" \
-      "${R_BIN}" CMD INSTALL "${INSTALL_ARGS}" arrow*.tar.gz
+      "${R_BIN}" CMD INSTALL "${R_INSTALL_ARGS[@]}" arrow*.tar.gz
 
 if [ "${BUILD_DOCS_R}" == "ON" ]; then
   ${R_BIN} -e "pkgdown::build_site(install = FALSE)"

Reply via email to