Commit graph

830 commits

Author SHA1 Message Date
Mislav Marohnić
10e96bfc47
rbenv 1.3.2 2025-01-08 15:05:27 +01:00
Mislav Marohnić
896e76c3d5
Merge pull request #1606 from rbenv/no-readarray
Fix traversing PATH for bash < 4.4
2025-01-08 14:48:03 +01:00
Mislav Marohnić
228fbf4c4f
Fix traversing PATH for bash < 4.4
Bash versions before 4.4 did not support the `-d` nor `-t` flags for readarray:
https://lists.gnu.org/archive/html/info-gnu/2016-09/msg00012.html

This switches away from readarray/"read" completely in favor of traversing PATH
by using string substitution.
2025-01-08 14:29:19 +01:00
Mislav Marohnić
84839ae589
rbenv 1.3.1 2025-01-08 00:00:16 +01:00
Mislav Marohnić
75aee988b3
Use static rbenv release version when generating man page 2025-01-07 23:59:22 +01:00
Mislav Marohnić
1d08efe089
Merge pull request #1604 from rbenv/readarray
Use readarray in bash v4+ to avoid rbenv init hanging
2025-01-07 23:52:57 +01:00
Mislav Marohnić
2e3ef01abb
Use readarray in bash v4+ to avoid rbenv init hanging
For just a handful of people, rbenv init would hang indefinitely. Turning on
debugging output suggested that the `read` expression to split PATH into a bash
array was hanging, but I could never reproduce this myself. Instead, this uses
bash v4+ `readarray` if it's available, or falls back to bash v3 `read` with the
default DELIM being a newline character. This will cause a regression if any PATH
entries contain a literal newline character, but hopefully people are not relying
on such paths.
2025-01-07 23:40:54 +01:00
Mislav Marohnić
efeab7f8ee
Merge pull request #1600 from mikelolasagasti/fix-127
Skip BW01 and BW02 error messages during tests
2024-12-11 18:47:21 +01:00
Mikel Olasagasti Uranga
e5c7eb3399 Skip BW01 and BW02 error messages during tests 2024-12-10 22:03:36 +01:00
Mislav Marohnić
a43095dc11
docs: further clarify the rbenv init command 2024-12-02 18:16:10 +01:00
Mislav Marohnić
4aa904634f
Merge pull request #1598 from rbenv/dependabot/github_actions/mislav/bump-homebrew-formula-action-3.2
Bump mislav/bump-homebrew-formula-action from 3.1 to 3.2
2024-11-25 23:25:44 +01:00
dependabot[bot]
4a7d13d7ce
Bump mislav/bump-homebrew-formula-action from 3.1 to 3.2
Bumps [mislav/bump-homebrew-formula-action](https://github.com/mislav/bump-homebrew-formula-action) from 3.1 to 3.2.
- [Release notes](https://github.com/mislav/bump-homebrew-formula-action/releases)
- [Commits](https://github.com/mislav/bump-homebrew-formula-action/compare/v3.1...v3.2)

---
updated-dependencies:
- dependency-name: mislav/bump-homebrew-formula-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 19:26:27 +00:00
Tom Schraitle
c335ab83de
Add /usr/etc/rbenv.d to hooks path (#1587)
The directory /usr/etc is an optional directory and used by
Fedora, RHEL 9, and openSUSE. The purpose of /usr/etc is to store
distribution-provided configuration files that can be overridden
by user-modified files in /etc.

Also used in the sister project pyenv/pyenv#3039

Co-authored-by: Mislav Marohnić <git@mislav.net>
2024-08-27 16:10:43 +02:00
Mislav Marohnić
bf1fcd346b
Merge pull request #1583 from nethad/patch-1
Add instructions for Fedora Linux installation
2024-07-16 02:46:42 +02:00
Thomas Ritter
873e0249a5
Fix numbering 2024-07-15 19:56:13 +02:00
Thomas Ritter
d6e547b94e
Add instructions for Fedora installation 2024-07-15 19:52:50 +02:00
Mislav Marohnić
3bac268cdb
rbenv 1.3.0 2024-07-05 15:02:25 +02:00
Mislav Marohnić
19fa774e42
Merge pull request #1579 from rbenv/no-rehash-default
rbenv init in setup mode defaults to no auto-rehashing
2024-07-05 14:56:58 +02:00
Mislav Marohnić
af03af9593
init: in setup mode, default to --no-rehash
When `rbenv init` is invoked to automatically edit shell startup files,
the generated lines will be invoking `rbenv init - --no-rehash` by default
to help speed up shell startup. Auto-rehashing on every shell startup can
be slow for some users but is not crucial to rbenv operation. Lets assume
that rbenv shims are already healthy and that they will be regenerated as
needed after installing new ruby versions and gems.
2024-07-05 14:44:17 +02:00
Mislav Marohnić
1fcb988164
readme: add some warnings 2024-07-05 14:39:31 +02:00
Mislav Marohnić
925e5ad0e7
Merge pull request #1575 from rbenv/readme-brew-install
Removes redundant ruby-build from brew-install
2024-07-05 14:16:28 +02:00
Jason Karns
35960ee19e
Removes redundant ruby-build from brew-install
This was already put in place by https://github.com/rbenv/rbenv/pull/863 but regressed with e4f61e67e2

(And ruby-build is still included in rbenv's formula)
2024-05-27 21:16:06 -04:00
Mislav Marohnić
c3ba994ec2
rbenv init: modify shell config files instead of printing instructions (#1568)
When running `rbenv init`, typically during rbenv setup, users expected
their shell environment to be modified permanently. Instead, what the
command would do is print the instructions to the user and expect them
to edit their shell initialization files accordingly. This proved to
be unintuitive.

Now, running `rbenv init <shells>...` will modify the shell initialization
files of the following shells:

- bash: `~/.bash_profile` or `~/.bashrc` if the latter exists but the former does not
- zsh: `~/.zprofile` or `~/.zshrc` if the latter exists and mentions "rbenv"
- fish: `~/.config/fish/config.fish`

If no shells were specified on the command line, rbenv will try to detect
the current shell.

It should be safe to run `rbenv init` multiple times, as the command will
avoid modifying any shell startup file that already mentions "rbenv init".
2024-05-03 16:59:39 +02:00
Farid NL
a3b98a4223
Use compsys completion system for zsh (#1569)
The new `_rbenv` script will be autoloaded by zsh as long as it's found in $FPATH.
It should be the package manager's responsibility to symlink or move this file
into an appropriate location.

Co-authored-by: Mislav Marohnić <git@mislav.net>
2024-05-03 16:57:16 +02:00
Mislav Marohnić
ac020225c2
Clarify help text of some commands (#1567) 2024-04-29 14:20:47 +02:00
Mislav Marohnić
f2ac882579
rbenv shell: properly declare global variables for zsh (#1566)
With zsh `setopt warn_create_global` the "shell" command used to cause
a warning message:

    scalar parameter RBENV_VERSION_OLD created globally in function rbenv.

By using `typeset -g` specifically for zsh, this warning goes away.
2024-04-29 14:20:21 +02:00
Hiroshi SHIBATA
e8b7a27ee6
Merge pull request #1544 from acook/patch-1
Update link to maintained version of Bats
2023-12-25 12:49:41 +09:00
Hiroshi SHIBATA
8d0ca21451
Merge pull request #1545 from rbenv/use-bats-core
Use bats-core instead of archived version
2023-12-25 12:49:09 +09:00
Hiroshi SHIBATA
d7a5e87d75
Use bats-core instead of archived version 2023-12-25 12:41:47 +09:00
Anthony M. Cook
5cae73944f
Update link to maintained version of Bats 2023-12-23 17:50:44 -06:00
benmelz
325abac17d
Move gem-rehash monkey patch (#1541)
The `rubygems_plugin.rb` file doesn't get loaded until after `Bundler::Installer.install` is called, so target `Bundler::Installer#install` to fix invocation order issues.

Co-authored-by: Mislav Marohnić <git@mislav.net>
2023-12-09 21:14:40 +01:00
Mislav Marohnić
d10388a052
Merge pull request #1537 from dipree/dipree/update-alerts-readme
Update alerts in README
2023-11-21 15:22:17 +01:00
Daniel Adams
7c4350edf4
Update alerts in README 2023-11-20 13:21:43 +01:00
Hiroshi SHIBATA
d6bb1c6396
Merge pull request #1533 from rbenv/dependabot/github_actions/redhat-plumbers-in-action/differential-shellcheck-5
Bump redhat-plumbers-in-action/differential-shellcheck from 4 to 5
2023-10-10 11:16:39 +09:00
dependabot[bot]
ad6544409b
Bump redhat-plumbers-in-action/differential-shellcheck from 4 to 5
Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 4 to 5.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/v4...v5)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 18:58:48 +00:00
Hiroshi SHIBATA
ae8a0ee125
Merge pull request #1531 from rbenv/dependabot/github_actions/mislav/bump-homebrew-formula-action-3.1
Bump mislav/bump-homebrew-formula-action from 3.0 to 3.1
2023-10-03 09:07:25 +09:00
dependabot[bot]
3646eb840b
Bump mislav/bump-homebrew-formula-action from 3.0 to 3.1
Bumps [mislav/bump-homebrew-formula-action](https://github.com/mislav/bump-homebrew-formula-action) from 3.0 to 3.1.
- [Release notes](https://github.com/mislav/bump-homebrew-formula-action/releases)
- [Commits](https://github.com/mislav/bump-homebrew-formula-action/compare/v3.0...v3.1)

---
updated-dependencies:
- dependency-name: mislav/bump-homebrew-formula-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 18:52:50 +00:00
Hiroshi SHIBATA
6e58140657
Merge pull request #1530 from rbenv/dependabot/github_actions/mislav/bump-homebrew-formula-action-3.0
Bump mislav/bump-homebrew-formula-action from 2.3 to 3.0
2023-09-27 14:50:05 +09:00
dependabot[bot]
a7e508fcdf
Bump mislav/bump-homebrew-formula-action from 2.3 to 3.0
Bumps [mislav/bump-homebrew-formula-action](https://github.com/mislav/bump-homebrew-formula-action) from 2.3 to 3.0.
- [Release notes](https://github.com/mislav/bump-homebrew-formula-action/releases)
- [Commits](https://github.com/mislav/bump-homebrew-formula-action/compare/v2.3...v3.0)

---
updated-dependencies:
- dependency-name: mislav/bump-homebrew-formula-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 18:48:03 +00:00
Hiroshi SHIBATA
d1f1865c2a
Merge pull request #1526 from rbenv/dependabot/github_actions/mislav/bump-homebrew-formula-action-2.3
Bump mislav/bump-homebrew-formula-action from 2.2 to 2.3
2023-09-19 10:03:53 +09:00
dependabot[bot]
86b5797083
Bump mislav/bump-homebrew-formula-action from 2.2 to 2.3
Bumps [mislav/bump-homebrew-formula-action](https://github.com/mislav/bump-homebrew-formula-action) from 2.2 to 2.3.
- [Release notes](https://github.com/mislav/bump-homebrew-formula-action/releases)
- [Commits](https://github.com/mislav/bump-homebrew-formula-action/compare/v2.2...v2.3)

---
updated-dependencies:
- dependency-name: mislav/bump-homebrew-formula-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 18:45:56 +00:00
Hiroshi SHIBATA
5d78e47399
Merge pull request #1521 from rbenv/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-09-05 08:35:57 +09:00
dependabot[bot]
59acc42647
Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 18:44:47 +00:00
Mislav Marohnić
4fec76f267
Merge pull request #1515 from rbenv/help-usage
help: have `--usage` always print a usage line
2023-07-14 23:29:47 +02:00
Mislav Marohnić
592fe6a087
help: have --usage always print a usage line 2023-07-11 18:54:38 +02:00
Richie Thomas
906a6acc10
version-file docs update (#1512)
Update rbenv-version-file docs to indicate that the returned version file may or may not actually exist.

Co-authored-by: Mislav Marohnić <git@mislav.net>
2023-07-11 17:38:36 +02:00
Mislav Marohnić
3112172081
Merge pull request #1504 from kpschoedel/ksh-versions
Support ksh versions
2023-06-21 12:06:55 +02:00
Kevin Schoedel
cfe1c37d26 Add explanatory comment, and remove obsolete versions 2023-05-13 12:56:22 -04:00
Hiroshi SHIBATA
af9201ea1e
Merge pull request #1505 from notEthan/comment-link-fix
Fix a dead link in a comment
2023-05-13 16:45:46 +09:00
Ethan
56512aee3b
fix dead link in comment 2023-05-13 00:14:21 -07:00