Paul Hinze 4c21cb6ae5
Add release-grade logic for finding legacy Vagrant
After lots of experimentation I have landed on this as my proposal for
how we have our Go binary find its Ruby counterpart: just have it grab
it from the $PATH! @evanphx showed me this neat trick where by borrowing
a couple of helper methods from `exec` and tweaking them we can get
logic that will do a $PATH lookup that excludes "ourself". This allows
us to have both `vagrant` executables on the path... and means that
switching between Gogo-by-default or Legacy-by-default is just a matter
of tweaking $PATH order.

It _also_ means that we don't need any different lookup logic for
"release mode" vs "development mode" which is what I was looking at
before this solution.

In order to continue to facilitate development, I've generated a binstub
for vagrant using `bundle binstubs vagrant --standalone --path
./binstubs`, and I've updated the Nix development setup to prepend this
directory to the $PATH.

NOTE: Non-Nix users will need to modify their $PATH in the same way to
get the same behavior in development.
2022-04-25 12:26:49 -05:00
..
2022-04-25 12:26:06 -05:00
2022-04-25 12:24:24 -05:00
2022-04-25 12:23:57 -05:00
2022-04-25 12:24:24 -05:00