Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install when user home directory contains @ symbol #4832

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

dacat
Copy link

@dacat dacat commented Dec 19, 2019

Fixes #3790 .

This provides for a workaround with users who have @ in their username.

It does this by:

  • making available an environment variable where a user can set their own gem separator RVM_GEM_SEPARATOR
  • replacing instances where @ is used with the variable rvm_gem_separator

A simple unit test is provided in rvm-test/fast and a more robust set of tests provided in rvm-test/gemset_separator_tests. The test runner,rvm-test/fast/rvm_gemset_separator_comment_test.sh, allows you test different gemset separators. Right now it tests only '@@' and all the tests pass.

Note: The build for this branch fails with the same failures that are in master.

…separator'

rvm_gemset_separator defines the string used to separate the
the ruby and the gemset. Traditionally, '@' is used to separate
the two. Throughout the code 'rvm_gemset_separator' is used,
however in parts of the code '@' is used instead of the
variable.

Testing Notes
 rvm-test/fast/*
   These tests are currently failing on travisci as well as
   my local machine.
   ##### Processed commands 622 of 622, success tests 432 of 434, failure tests 2 of 434.
   $ rvm 2.3.4@global,2.3.4 do rvm gemdir
   # failed: match = /2.3.4@global$/
   $ bundle config
   # failed: status = 127 # was 0

 rvm-test/long/named_ruby_and_gemsets_comment_test.sh
   ##### Processed commands 21 of 21, success tests 27 of 27.

 rvm-test/long/truffleruby_comment_test.sh
   ##### Processed commands 13 of 13, success tests 21 of 21.

 rvm-test-rvm1/*
   ##### Processed commands 378 of 378, success tests 206 of 207, failure tests 1 of 207.
   $ PATH="$( echo $PATH | sed 's/^.*rvm[^:]*://' )"

   The rvm-test-rvm1/load_ruby-version_comment_test.sh failed on
   my local master branch as well.
* Fixes a few more instances of rvm_gemset_separator not
  being used where '@' is used.
* one simple unit test was added
* the fast/* suite was copied then modified to execute all
  the fast tests with a custom gemset separator
* The only separator tested is '@@'
rvm-test/Gemfile Outdated Show resolved Hide resolved
@pkuczynski
Copy link
Member

Your PR seems to break rvm-test included as a separate repository. Can you fix it please?

@pkuczynski pkuczynski changed the title Fixes for Issue #3790 Fix install when user home directory contains @ symbol Mar 25, 2020
@dacat
Copy link
Author

dacat commented Mar 25, 2020 via email

@pkuczynski
Copy link
Member

@dacat any update?

@dacat
Copy link
Author

dacat commented Apr 14, 2020

@pkuczynski The rvm-test directory is a git subtree for rvm/rvm-test. The test's i added need to be pushed to rvm/rvm-test. Is that correct?

Also, the failing tests in rvm-test are the same that are failing in the master branch.
I want to discuss this in real time shoot me an email and we can schedule something.

@pkuczynski
Copy link
Member

Yes, that's correct. You need to add your tests to rvm-test repo. I can add you to our slack. Just don't see your email?

@eregon
Copy link
Contributor

eregon commented Apr 15, 2020

@pkuczynski See rvm/rvm-test#29 (comment) and https://github.com/rvm/rvm/commits/master/rvm-test
It's perfectly fine to change files under rvm-test/ here directly, and not bother with two repositories.

@pkuczynski pkuczynski added this to the rvm-1.29.11 milestone Apr 17, 2020
@pkuczynski
Copy link
Member

@dacat how its going with this PR?

@pkuczynski pkuczynski modified the milestones: rvm-1.29.11, rvm-1.29.12 Dec 29, 2020
@pkuczynski pkuczynski modified the milestones: rvm-1.29.12, rvm-1.29.13 Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rvm can't install if user home directory contains @ symbol
3 participants