Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}'))")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}').

else
poms=$(echo "$poms" | xargs -n1 realpath -s --relative-to="${source_dir}")
fi
Expand Down
Loading