Last active
August 29, 2015 14:08
-
-
Save dholdren/d3201ee2c6ce12e0add8 to your computer and use it in GitHub Desktop.
RVM cd broken on a directory with only a Gemfile
This file contains hidden or 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
#!/bin/bash | |
set -e | |
source "$HOME/.rvm/scripts/rvm" #so 'cd' will change gemset when dotfiles present | |
#setup | |
rm -rf ~/tmp/dir_with_gemfile | |
mkdir -p ~/tmp/dir_with_gemfile | |
echo "source 'https://rubygems.org'" > ~/tmp/dir_with_gemfile/Gemfile | |
echo "gem 'rails'" >> ~/tmp/dir_with_gemfile/Gemfile | |
#end setup | |
#works | |
echo 'pre cd ~' | |
cd ~ | |
echo 'post cd ~' | |
#exits after "cd" | |
echo 'pre cd ~/tmp/dir_with_gemfile' | |
cd ~/tmp/dir_with_gemfile | |
echo 'post cd ~/tmp/dir_with_gemfile' |
This file contains hidden or 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
>./broken_cd.sh | |
pre cd ~ | |
post cd ~ | |
pre cd ~/tmp/dir_with_gemfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment