Skip to content

Commit

Permalink
Rehash binaries on switch, forcing it to forget seen executables / lo…
Browse files Browse the repository at this point in the history
…okup new path
  • Loading branch information
Sutto committed Aug 22, 2010
1 parent d28bff5 commit f6473f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/selector
Expand Up @@ -338,6 +338,8 @@ __rvm_use() {
fi
fi

# Rehash executable locations, e.g. to force the shell to recognize new items in the path.
builtin hash -r
rvm_hook="after_use" ; source $rvm_scripts_path/hook
}

Expand Down

3 comments on commit f6473f2

@paneq
Copy link

@paneq paneq commented on f6473f2 Aug 25, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sutto
Copy link
Contributor Author

@Sutto Sutto commented on f6473f2 Aug 25, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@paneq
Copy link

@paneq paneq commented on f6473f2 Aug 25, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.