Skip to content

Commit

Permalink
Fix PATH string building (#10)
Browse files Browse the repository at this point in the history
References #5
  • Loading branch information
MinasMazar authored and tpope committed May 1, 2017
1 parent 9bddeab commit f62ef43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/rvm.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif

if !exists('$rvm_path') && isdirectory(expand('~/.rvm'))
let $rvm_path = expand('~/.rvm')
let $PATH .= ':' . $rvm_path . '/bin'
let $PATH = $rvm_path . '/bin' . ':' . $PATH
endif

if !exists('$rvm_path')
Expand Down Expand Up @@ -74,7 +74,7 @@ function! s:Rvm(bang,...) abort
let $RUBY_VERSION = ''
let $MY_RUBY_HOME = ''
let $IRBRC = expand('~/.irbrc')
let $PATH = join(path + [$rvm_path.'/bin'],':')
let $PATH = join([$rvm_path.'/bin'] + path,':')
let $GEM_HOME = system('env -i PATH="'.$PATH.'" ruby -rubygems -e "print Gem.dir"')
let $GEM_PATH = system('env -i PATH="'.$PATH.'" ruby -rubygems -e "print Gem.path.join(%{:})"')
if use
Expand Down Expand Up @@ -107,8 +107,8 @@ function! s:Rvm(bang,...) abort

let $GEM_PATH = join(gemsets, ':')
let $PATH = join(
\ [$MY_RUBY_HOME.'/bin'] +
\ map(gemsets,'v:val."/bin"') +
\ [$MY_RUBY_HOME.'/bin'] +
\ [$rvm_path.'/bin'] +
\ path, ':')
if use
Expand Down

0 comments on commit f62ef43

Please sign in to comment.