Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ruby-build ruby-X.Y.Z DIR #2448

Merged
merged 6 commits into from
Sep 23, 2024
Merged
Changes from 1 commit
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
11 changes: 11 additions & 0 deletions bin/ruby-build
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,17 @@ if [ ! -f "$DEFINITION_PATH" ]; then
fi
done

# If the given definition is like ruby-X.Y.Z, search again with X.Y.Z
if [[ "$DEFINITION_PATH" =~ ^ruby-[0-9] ]]; then
DEFINITION_PATH="${DEFINITION_PATH#ruby-}"
for DEFINITION_DIR in "${RUBY_BUILD_DEFINITIONS[@]}"; do
if [ -f "${DEFINITION_DIR}/${DEFINITION_PATH}" ]; then
DEFINITION_PATH="${DEFINITION_DIR}/${DEFINITION_PATH}"
break
fi
done
fi

if [ ! -f "$DEFINITION_PATH" ]; then
echo "ruby-build: definition not found: ${DEFINITION_PATH}" >&2
exit 2
Expand Down