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

bundle exec CMD --help opens bundler man-page #4480

Closed
dziemba opened this issue Apr 29, 2016 · 2 comments
Closed

bundle exec CMD --help opens bundler man-page #4480

dziemba opened this issue Apr 29, 2016 · 2 comments

Comments

@dziemba
Copy link

dziemba commented Apr 29, 2016

When running bundle exec rspec --help on bundler 1.11.2 it displays the help output of RSpec, as expected.

Running the same command on bundler 1.12.0 opens the bundler-exec man page and completely ignores the specified command.

For some reason it works for the bundler command, only bundle is affected.

Some more examples:

# these work as expected
bundle exec rspec --version
bundle exec rspec -- --version
bundle exec rspec
bundler exec rspec --help

# these don't work
bundle exec rspec --help
bundle exec rspec -- --help
bundle exec this_will_never_be_executed_anyway --help
bundle exec this_will_never_be_executed_anyway -- --help

To reproduce it:

FROM ubuntu:16.04
RUN apt-get update && apt-get install -y ruby
RUN gem install bundler -v 1.12.0
docker build -t bundler-test .

# works as expected (says no Gemfile)
docker run bundler-test bundler exec foobar --help

# opens the man-page
docker run bundler-test bundle exec foobar --help
@RochesterinNYC
Copy link
Contributor

Hi @dziemba, thanks for the issue. I believe this was introduced in #4178. While having --help go to the man pages for all the other Bundler commands makes sense (I.e. bundle package --help goes to the man page for bundle package), I do agree that following that behavior for bundle exec might feel weird and unexpected.

Are there any other Bundler commands you as a user might feel the --help redirect behavior is unexpected for?

@RochesterinNYC
Copy link
Contributor

RochesterinNYC commented Apr 29, 2016

Also, I'm assigning this issue and fix to one of our Google Summer of Code students: @b-ggs

homu added a commit that referenced this issue May 4, 2016
Show executable's man page when --help or -h is present

Fixes #4480, where `bundle exec foo --help` shows `bundle exec`'s man instead of `foo`'s man.

@RochesterinNYC
@homu homu closed this as completed in #4487 May 4, 2016
segiddins pushed a commit that referenced this issue May 4, 2016
Show executable's man page when --help or -h is present

Fixes #4480, where `bundle exec foo --help` shows `bundle exec`'s man instead of `foo`'s man.

@RochesterinNYC
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants