Bundler appears to be an increasingly popular
gem. It's a
good complement to rvm. However, one aspect of it that I find mildly irksome is its default behaviour when called from the
command line without any
arguments.
I prefer command line programs to execute, when called without arguments, only if they are
nullipotent. For instance, the command
ls executes when called without arguments, and this is both useful and also, because
ls is nullipotent, safe.
If a command line program is not nullipotent, then its default behaviour when called without arguments should, in my view, be to behave as though it has been called together with its
help
option. For instance,
rm, when called without arguments, instead of deleting anything (which is what
rm is normally used for) lists the arguments it takes, much as if
rm -h or
rm --help had been called instead.
The
bundle command, by contrast, when called without any arguments, behaves as though
bundle install has been been called. That is, Bundler treats the
bundle and
bundle install commands as synonymous equivalents. I'm considering filing a bug report about this, because if it's intended behaviour, then the intention is questionable insofar as it breaks the command line conventions I've outlined above, to little advantage (a terser way of calling
bundle install) and an obvious disadvantage (the possibility for a user to invoke
bundler install unexpectedly and thereby install or reinstall a bundle of gems on his/her machine without having wished to do so).
This entry was posted
on Monday, September 26th, 2011 at 2:47 pm and is filed under Ethics, hacking.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Bug report now written and filed here.