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

Already on GitHub? Sign in to your account

Printing 'Running hooks/after_cd' when logging in #1021

bronson opened this Issue Jun 20, 2012 · 4 comments


None yet
2 participants

bronson commented Jun 20, 2012

RVM prints Running /usr/local/rvm/hooks/after_cd when sshing into my web server and changing directories. Happens 100% of the time.

Not a big deal, just trying to help figure out what's going on. Probably related to #995 and http://stackoverflow.com/questions/10751391/why-am-i-seeing-this-running-after-cd-message-in-the-latest-version-of-rvm

How to reproduce

If you have a host with a directory that has an .rvmrc, try this:

ssh -A host.example.com -t 'cd dir-with-rvmrc && bash --login'

My .rvmrc just contains rvm use ruby-1.9.3. This gets printed before getting a login shell:

Using /usr/local/rvm/gems/ruby-1.9.3-p194
Using /usr/local/rvm/gems/ruby-1.9.3-p194
Running /usr/local/rvm/hooks/after_cd

bronson commented Jun 20, 2012

Heck with all the jazz above. To see the message, just cd to a directory that contains an .rvmrc and run bash.

$ cd myproject
Using /Users/bronson/.rvm/gems/ruby-1.9.3-p194
$ bash
Using /Users/bronson/.rvm/gems/ruby-1.9.3-p194
Running /Users/bronson/.rvm/hooks/after_cd
$ exit

mpapis commented Jun 20, 2012

this is expected behavior as rvm use sets rvm_verbose_flag=1 and https://github.com/wayneeseguin/rvm/blob/master/scripts/hook#L21 checks for it - so it will be printed, this script was not available in earlier versions of rvm and that's why it was not printed ...

I guess this should be fixed by moving parts of the logic from after_cd to hooks

@ghost ghost assigned mpapis Jun 20, 2012


mpapis commented Aug 9, 2012

rescheduling to 2.0 for reworking (fixing) the hooks mechanism

@mpapis mpapis closed this in 996b8cc Sep 13, 2012


mpapis commented Sep 13, 2012

you were getting double Using because of the second bash --login - the first one was done by ssh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment