diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2022-09-26 20:11:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-26 20:11:50 +0300 |
commit | 8c19bb1626c5e8b0b422b20ebf765e31fc200d26 (patch) | |
tree | 228622c44a12da29a553df09b589d9c1b482e10a | |
parent | 7aad1972287dc8927648d93785d79b0f25e3d180 (diff) |
Ruby: Fix rbenv init bug (#185)
* fix rbenv bug
* bump version
* adds test
-rw-r--r-- | src/ruby/devcontainer-feature.json | 4 | ||||
-rwxr-xr-x | src/ruby/install.sh | 3 | ||||
-rw-r--r-- | test/ruby/install_additional_ruby.sh | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/ruby/devcontainer-feature.json b/src/ruby/devcontainer-feature.json index 3cccec3..9e617d0 100644 --- a/src/ruby/devcontainer-feature.json +++ b/src/ruby/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "ruby", - "version": "1.0.3", + "version": "1.0.4", "name": "Ruby (via rvm)", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/ruby", "description": "Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.", @@ -29,6 +29,6 @@ "GEM_PATH": "/usr/local/rvm/gems/default:/usr/local/rvm/gems/default@global", "GEM_HOME": "/usr/local/rvm/gems/default", "MY_RUBY_HOME": "/usr/local/rvm/rubies/default", - "PATH": "/usr/local/rvm/gems/default/bin:/usr/local/rvm/gems/default@global/bin:/usr/local/rvm/rubies/default/bin:${PATH}" + "PATH": "/usr/local/rvm/gems/default/bin:/usr/local/rvm/gems/default@global/bin:/usr/local/rvm/rubies/default/bin:/usr/local/share/rbenv/bin:${PATH}" } }
\ No newline at end of file diff --git a/src/ruby/install.sh b/src/ruby/install.sh index 62a096b..6ff3b2f 100755 --- a/src/ruby/install.sh +++ b/src/ruby/install.sh @@ -263,9 +263,6 @@ if [ "${SKIP_RBENV_RBUILD}" != "true" ]; then -c fetch.fsck.zeroPaddedFilemode=ignore \ -c receive.fsck.zeroPaddedFilemode=ignore \ https://github.com/rbenv/rbenv.git /usr/local/share/rbenv - - ln -s /usr/local/share/rbenv/bin/rbenv /usr/local/bin - updaterc 'eval "$(rbenv init -)"' fi if [[ ! -d "/usr/local/share/ruby-build" ]]; then diff --git a/test/ruby/install_additional_ruby.sh b/test/ruby/install_additional_ruby.sh index 3e76159..e5a651c 100644 --- a/test/ruby/install_additional_ruby.sh +++ b/test/ruby/install_additional_ruby.sh @@ -9,5 +9,7 @@ check "ruby version 3.1.2 installed as default" ruby -v | grep 3.1.2 check "ruby version 2.5.9 installed" rvm list | grep 2.5.9 check "ruby version 3.0.4 installed" rvm list | grep 3.0.4 +check "rbenv" bash -c 'eval "$(rbenv init -)" && rbenv --version' + # Report result reportResults |