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 absolute path bug in .profile.d/ruby.sh $PATH #973

Merged
merged 2 commits into from
Apr 1, 2020

Commits on Mar 31, 2020

  1. Fix absolute path bug in .profile.d/ruby.sh $PATH

    In #888 a relative path was accidentally introduced into the `.profile.d/ruby.sh` script:
    
    ```
    export PATH="bin:$HOME/vendor/bundle/bin:$HOME/vendor/bundle/ruby/2.6.0/bin:$PATH"
    ```
    
    That first path `bin` is relative and should be `$HOME/bin`.
    
    Without it, then changing into a different directory means that the system version of ruby will be used
    
    ```
    ~ $ which ruby
    bin/ruby
    ~ $ mkdir foo; cd foo
    ~/foo $ which ruby
    /usr/bin/ruby
    ```
    
    This is a regression  was not caught by tests previously because the version of ruby that the test `cd_ruby` uses is 2.5.1 and that happens to match system ruby. To fix for catching future regressions the test is now more explicit.
    
    Unfortunately there's a bug in hatchet preventing that specific test heroku/hatchet#71 so instead I'm at least asserting that it's an absolute path.
    schneems committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    0e52f71 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2020

  1. CNB extra test and test helper class

    Fix CNB case.
    
    In the CNB build process the `gem_layer_path` is not `$HOME` to ensure that `$HOME/bin` is always on the path, we can manually add it. If it gets added multiple times, we'll call `uniq` on the array before setting the override.
    schneems committed Apr 1, 2020
    Configuration menu
    Copy the full SHA
    203e9ea View commit details
    Browse the repository at this point in the history