Skip to content
This repository
Browse code

Rehash binaries on switch, forcing it to forget seen executables / lo…

…okup new path
  • Loading branch information...
commit f6473f29458d60201c47cf65ae7dde465ef0adfc 1 parent d28bff5
Darcy Laycock authored August 22, 2010

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  scripts/selector
2  scripts/selector
@@ -338,6 +338,8 @@ __rvm_use() {
338 338
     fi
339 339
   fi
340 340
 
  341
+  # Rehash executable locations, e.g. to force the shell to recognize new items in the path.
  342
+  builtin hash -r
341 343
   rvm_hook="after_use" ; source $rvm_scripts_path/hook
342 344
 }
343 345
 

3 notes on commit f6473f2

Darcy Laycock

For future reference, this was only part of the problem - and not really that much of a solution.

More relevant for the issue paneq mentions (and discussed in Yehuda's excellent blog post) are
ee8aee6 and 8940cac - although
the latter may be unneeded).

Robert Pankowecki

It required quite a lot of work to fix it. However its beyond my imagination how to write tests that can check against such cases :-)

Please sign in to comment.
Something went wrong with that request. Please try again.