Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Bundler should not call which under windows #664

Closed
arthurschreiber opened this issue Sep 8, 2010 · 1 comment
Closed

Bundler should not call which under windows #664

arthurschreiber opened this issue Sep 8, 2010 · 1 comment

Comments

@arthurschreiber
Copy link

Windows does normally not provide a which command, so there is no point in calling this on Ruby running on windows.

Actually, this can even cause problems, when there is a which.exe in your path that does not do what *nix which does. In fact, this causes problems when running bundler on the windows servers im deploying to, as calling which there is a) sloooow, and b) raises an error.

One such occurrence of calling which is in Bundler.requires_sudo?, which shouldn't even have to check for sudo when running on windows.

@dmag
Copy link

dmag commented Sep 9, 2010

also, in "requires_sudo?" Bundler tries to figure out where the sudo binary is -- even if it decides it doesn't need sudo. So it ends up running sh which sudo four times. This wouldn't be so bad for "bundle ..." commands, but it does this for EVERY ruby script that loads bundler. Can we defer which sudo for the times we actually need it?

joevandyk pushed a commit to joevandyk/bundler that referenced this issue May 16, 2011
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants