diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2022-06-02 22:01:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-02 22:01:11 +0300 |
commit | d8581f49360e9ed62ba1b3db2a595a8ef7687044 (patch) | |
tree | 539a0d6083fcf6521ff83221f3e5aeecb21bec06 /src | |
parent | 1da3b0ef10a4715722f0ff053b2aa36af192d29b (diff) |
Samruddhikhandale/attempt fix ruby (#38)
* add source
* temp - debug
* ruby: fix sourcing bug
Diffstat (limited to 'src')
-rw-r--r-- | src/ruby/install.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ruby/install.sh b/src/ruby/install.sh index 7c71282..3d3edbc 100644 --- a/src/ruby/install.sh +++ b/src/ruby/install.sh @@ -226,15 +226,16 @@ else # Install rvm curl -sSL https://get.rvm.io | bash -s stable --ignore-dotfiles ${RVM_INSTALL_ARGS} --with-default-gems="${DEFAULT_GEMS}" 2>&1 usermod -aG rvm ${USERNAME} - su ${USERNAME} -c ". /usr/local/rvm/scripts/rvm && rvm fix-permissions system" + source /usr/local/rvm/scripts/rvm + rvm fix-permissions system rm -rf ${GNUPGHOME} fi if [ "${INSTALL_RUBY_TOOLS}" = "true" ]; then # Non-root user may not have "gem" in path when script is run and no ruby version # is installed by rvm, so handle this by using root's default gem in this case - ROOT_GEM='$(which gem || echo "")' - su ${USERNAME} -c ". /usr/local/rvm/scripts/rvm && \"$(which gem || echo ${ROOT_GEM})\" install ${DEFAULT_GEMS}" + ROOT_GEM="$(which gem || echo "")" + ${ROOT_GEM} install ${DEFAULT_GEMS} fi # VS Code server usually first in the path, so silence annoying rvm warning (that does not apply) and then source it @@ -268,5 +269,7 @@ if [ ${SKIP_RBENV_RBUILD} != "true"] ; then fi # Clean up -su ${USERNAME} -c ". /usr/local/rvm/scripts/rvm && rvm cleanup all && \"$(which gem || echo ${ROOT_GEM})\" cleanup" +rvm cleanup all +${ROOT_GEM} cleanup + echo "Done!" |