-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "rbenv: command not found" error when running
rbenv:install
(#447)
Recently, tomo's `rbenv:install` task has started failing with this output: ``` Installing ruby 3.3.0 -- this may take several minutes CFLAGS=-O3 rbenv install 3.3.0 --verbose bash: line 1: rbenv: command not found ``` This is because rbenv was recently updated[^1] to to automatically add the `rbenv init` script to the `.bashrc` file during installation. However, rbenv adds it to the _bottom_ of the file after the early-exit that skips most of the `.bashrc` when it is sourced in a non-interactive shell (i.e. tomo via SSH). That left rbenv in an installed but broken state; hence the error. Fix by having `rbenv:install` detect this situation and prepend the `rbenv init` script to the _top_ of the file, where it will get loaded for non-interactive shells such as tomo's. [^1]: rbenv/rbenv-installer#50
- Loading branch information
1 parent
b780936
commit dfb0ebb
Showing
2 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters