jbonofre commented on code in PR #1498:
URL: https://github.com/apache/arrow-java/pull/1498#discussion_r4611293879
##########
ci/scripts/build.sh:
##########
@@ -48,7 +48,7 @@ cp -r "${source_dir}/dev" "${build_dir}"
poms=$(find "${source_dir}" -not \( -path "${source_dir}"/build -prune \)
-type f -name pom.xml)
if [[ "$OSTYPE" == "darwin"* ]]; then
- poms=$(echo "$poms" | xargs -n1 python -c "import sys; import os.path;
print(os.path.relpath(sys.argv[1], '${source_dir}'))")
+ poms=$(echo "$poms" | xargs -n1 "${PYTHON:-python3}" -c "import sys; import
os.path; print(os.path.relpath(sys.argv[1], '${source_dir}'))")
Review Comment:
Using `"${PYTHON:-python3}"` fixes the missing `python` binary on macOS,
though I prefer @kou suggest above: running `find` after `cd "${source_dir}"`
removes both the Python dependency and the OS-specific `if`/`else` branch, and
avoids pasting `${source_dir}` directly into Python source (`'${source_dir}'`).
--
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]