Disable Ruby 4.0.4 install-time docs for ruby-build installs#127
Disable Ruby 4.0.4 install-time docs for ruby-build installs#127Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/rails/devcontainer/sessions/1837d2fa-6c84-4e73-b77b-e98819020a0e Co-authored-by: rafaelfranca <47848+rafaelfranca@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rails/devcontainer/sessions/1837d2fa-6c84-4e73-b77b-e98819020a0e Co-authored-by: rafaelfranca <47848+rafaelfranca@users.noreply.github.com>
|
@copilot does using this option cause miss to not use the precompiled versions? |
No — not in the precompiled path. In |
|
@copilot can we only use the disable-doc option the the Ruby version is 4.0.4? |
Agent-Logs-Url: https://github.com/rails/devcontainer/sessions/599a0756-c64a-4e66-9b09-97bf987809a4 Co-authored-by: rafaelfranca <47848+rafaelfranca@users.noreply.github.com>
Done in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot improve your changes. There is too much duplication in your code |
Agent-Logs-Url: https://github.com/rails/devcontainer/sessions/07591f78-fd4c-459b-a3dc-6bbed5e8fe5c Co-authored-by: rafaelfranca <47848+rafaelfranca@users.noreply.github.com>
Done in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR scopes a workaround for a Ruby 4.0.4 ruby-build regression by conditionally disabling install-time documentation generation during Ruby installation, while keeping all other Ruby version install behavior unchanged.
Changes:
- Add a shared helper to run Ruby install commands under
su, injectingRUBY_CONFIGURE_OPTS='--disable-install-doc'only for Ruby4.0.4. - Apply the version-specific workaround to both the
rbenvandmiseRuby install paths.
Comments suppressed due to low confidence (1)
features/src/ruby/install.sh:132
ruby@$_versionis expanded into thesu -cstring without quoting. BecauseVERSIONis user-controlled via feature options, this can break for unexpected values and can allow shell injection in the-cstring. Wrap the version argument in quotes (e.g., pass"ruby@$_version"as done for the install command).
run_ruby_install_command "$_user" "$_version" "$_home_dir/.local/bin/mise install \"ruby@$_version\""
su "$_user" -c "$_home_dir/.local/bin/mise use -g ruby@$_version"
su "$_user" -c "$_home_dir/.local/bin/mise settings add idiomatic_version_file_enable_tools ruby"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -73,11 +73,24 @@ setup_rbenv() { | |||
| } | |||
|
|
|||
| # Function to install Ruby with rbenv | |||
| run_ruby_install_command "$_user" "$_version" "/usr/local/share/rbenv/bin/rbenv install \"$_version\"" | ||
| su "$_user" -c "/usr/local/share/rbenv/bin/rbenv global $_version" | ||
| } |
Ruby 4.0.4 installs started failing in the Ruby feature due to an upstream regression during install-time documentation generation. This change makes both supported install paths skip doc generation only for Ruby 4.0.4 so the feature can provision the affected version reliably without changing other Ruby install flows.
What changed
RUBY_CONFIGURE_OPTS='--disable-install-doc'when installing Ruby 4.0.4 throughmiserbenvWhy this is scoped correctly
miseandrbenvflow throughruby-build, so both paths need the same version-specific guardrailResult