Hacker News new | ask | show | jobs
by otterley 4632 days ago
You're doing too much. All you need to do is:

  source /usr/local/rvm/environments/$BUILD
You can put it in a wrapper script if you like. It will unset all conflicting environment variables first.
1 comments

The thing is that the rvmrc has the jruby version env set. So I need to load it first. And it contains an 'rvm use' which I don't want to fail. I suppose I can slim the rvmrc down to just include the environment and then all I would need to do is source the rvmrc? Thoughts?
I don't believe you need to source the rvmrc. The line I pasted above does all the necessary things that "rvm use $BUILD" would do for a shell, without all the things that require an interactive shell.
The rvmrc is part of the repo and contains the java_opts env.