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

Bundler takes over --help given arguments are passed. #4596

Closed
envygeeks opened this issue May 21, 2016 · 9 comments
Closed

Bundler takes over --help given arguments are passed. #4596

envygeeks opened this issue May 21, 2016 · 9 comments

Comments

@envygeeks
Copy link

envygeeks commented May 21, 2016

\bundle exec docker-template build --help # Works.
\bundle exec docker-template build discourse --no-push --help # Works
\bundle exec docker-template build discourse --help # Bundler Takes Over for reasons unknown.
\bundle exec docker-template build --no-push --help # Works.

From our actual UX

bin/docker-template build --help # Works
bin/docker-template build discourse --help # Works
bin/docker-template build --no-push --help # Works
bin/docker-template build discourse --no-push --help # Works

Given only a single non --dash argument is given, Bundler takes over the --help switch and doesn't give the right help.

@envygeeks
Copy link
Author

This is related to: #4597

@segiddins
Copy link
Member

What's the output of bundle env?

@envygeeks
Copy link
Author

Environment

    Bundler   1.12.4
    Rubygems  2.6.4
    Ruby      2.3.0p0 (2015-12-25 revision 0) [x86_64-linux-gnu]
    Git       2.7.4

Bundler settings

    path
      Set for your local app (/home/jordon/development/envygeeks/docker-template/.bundle/config): "vendor/bundle"
    jobs
      Set for your local app (/home/jordon/development/envygeeks/docker-template/.bundle/config): "128"
    disable_shared_gems
      Set for your local app (/home/jordon/development/envygeeks/docker-template/.bundle/config): "true"
    orig_path
      Set via BUNDLE_ORIG_PATH: "/home/jordon/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

Gemfile

    # ----------------------------------------------------------------------------
    # Frozen-string-literal: true
    # Copyright: 2015 - 2016 Jordon Bedwell - Apache v2.0 License
    # Encoding: utf-8
    # ----------------------------------------------------------------------------

    source "https://rubygems.org"
    gem "rake", :require => false
    gemspec

    group :test do
      gem "rspec", :require => false
      gem "luna-rspec-formatters", :require => false
      gem "codeclimate-test-reporter", :require => false
      gem "memory_profiler", :require => false, :platform => :mri
      gem "rubocop", :github => "bbatsov/rubocop", :branch => :master, :require => false
      gem "rugged", :require => false, :platform => :mri
      gem "luna-rubocop-formatters", :require => false
      gem "benchmark-ips", :require => false
      gem "rspec-helpers", :require => false
      gem "cucumber", :require => false
    end

    group :development do
      unless ENV["CI"]
        gem "pry", :require => false
        gem "msgpack", {
          :require => false
        }
      end
    end

Gemfile.lock

    GIT
      remote: git://github.com/bbatsov/rubocop.git
      revision: 584326962d721d630c15219c0f99f040d6c27b57
      branch: master
      specs:
        rubocop (0.40.0)
          parser (>= 2.3.1.0, < 3.0)
          powerpack (~> 0.1)
          rainbow (>= 1.99.1, < 3.0)
          ruby-progressbar (~> 1.7)
          unicode-display_width (~> 1.0, >= 1.0.1)

    PATH
      remote: .
      specs:
        docker-template (0.8.0)
          activesupport (~> 4.2)
          docker-api (~> 1.28)
          extras (~> 0.1)
          json (~> 1.8)
          pathutil (~> 0.7)
          simple-ansi (~> 1.0)
          thor (~> 0.19)

    GEM
      remote: https://rubygems.org/
      specs:
        activesupport (4.2.6)
          i18n (~> 0.7)
          json (~> 1.7, >= 1.7.7)
          minitest (~> 5.1)
          thread_safe (~> 0.3, >= 0.3.4)
          tzinfo (~> 1.1)
        ast (2.2.0)
        benchmark-ips (2.6.1)
        builder (3.2.2)
        codeclimate-test-reporter (0.5.0)
          simplecov (>= 0.7.1, < 1.0.0)
        coderay (1.1.1)
        cucumber (2.3.3)
          builder (>= 2.1.2)
          cucumber-core (~> 1.4.0)
          cucumber-wire (~> 0.0.1)
          diff-lcs (>= 1.1.3)
          gherkin (~> 3.2.0)
          multi_json (>= 1.7.5, < 2.0)
          multi_test (>= 0.1.2)
        cucumber-core (1.4.0)
          gherkin (~> 3.2.0)
        cucumber-wire (0.0.1)
        diff-lcs (1.2.5)
        docile (1.1.5)
        docker-api (1.28.0)
          excon (>= 0.38.0)
          json
        excon (0.49.0)
        extras (0.1.0)
          forwardable-extended (~> 2.5)
        forwardable-extended (2.6.0)
        gherkin (3.2.0)
        i18n (0.7.0)
        json (1.8.3)
        luna-rspec-formatters (3.7.4)
          rspec (>= 2.14, < 4.0)
        luna-rubocop-formatters (1.3.0)
          rubocop (>= 0.34.0, < 1.0)
        memory_profiler (0.9.6)
        method_source (0.8.2)
        minitest (5.9.0)
        msgpack (0.7.6)
        multi_json (1.12.1)
        multi_test (0.1.2)
        parser (2.3.1.0)
          ast (~> 2.2)
        pathutil (0.14.0)
          forwardable-extended (~> 2.6)
        powerpack (0.1.1)
        pry (0.10.3)
          coderay (~> 1.1.0)
          method_source (~> 0.8.1)
          slop (~> 3.4)
        rainbow (2.1.0)
        rake (11.1.2)
        rspec (3.4.0)
          rspec-core (~> 3.4.0)
          rspec-expectations (~> 3.4.0)
          rspec-mocks (~> 3.4.0)
        rspec-core (3.4.4)
          rspec-support (~> 3.4.0)
        rspec-expectations (3.4.0)
          diff-lcs (>= 1.2.0, < 2.0)
          rspec-support (~> 3.4.0)
        rspec-helpers (1.2.0)
          rspec (>= 3.0, < 4.0)
        rspec-mocks (3.4.1)
          diff-lcs (>= 1.2.0, < 2.0)
          rspec-support (~> 3.4.0)
        rspec-support (3.4.1)
        ruby-progressbar (1.8.1)
        rugged (0.24.0)
        simple-ansi (1.0.2)
        simplecov (0.11.2)
          docile (~> 1.1.0)
          json (~> 1.8)
          simplecov-html (~> 0.10.0)
        simplecov-html (0.10.0)
        slop (3.6.0)
        thor (0.19.1)
        thread_safe (0.3.5)
        tzinfo (1.2.2)
          thread_safe (~> 0.1)
        unicode-display_width (1.0.5)

    PLATFORMS
      ruby

    DEPENDENCIES
      benchmark-ips
      codeclimate-test-reporter
      cucumber
      docker-template!
      luna-rspec-formatters
      luna-rubocop-formatters
      memory_profiler
      msgpack
      pry
      rake
      rspec
      rspec-helpers
      rubocop!
      rugged

    BUNDLED WITH
       1.12.4

Gem.gemspec

    # ----------------------------------------------------------------------------
    # Frozen-string-literal: true
    # Copyright: 2015 Jordon Bedwell - Apache v2.0 License
    # Encoding: utf-8
    # ----------------------------------------------------------------------------

    $LOAD_PATH.unshift(File.expand_path("../lib", __FILE__))
    require "docker/template/version"

    Gem::Specification.new do |spec|
      spec.authors = ["Jordon Bedwell"]
      spec.executables << "docker-template"
      spec.version = Docker::Template::VERSION
      spec.description = "Build and template awesome Docker images a variety of ways."
      spec.files = %W(Rakefile Gemfile README.md LICENSE shas.yml) + Dir["{lib,bin,templates,comp}/**/*"]
      spec.summary = "Build and template Docker images a variety of ways."
      spec.homepage = "http://github.com/envygeeks/docker-template/"
      spec.required_ruby_version = ">= 2.1.0"
      spec.email = ["[email protected]"]
      spec.require_paths = ["lib"]
      spec.name = "docker-template"
      spec.license = "MIT"
      spec.has_rdoc = false
      spec.bindir = "bin"

      spec.add_runtime_dependency("thor", "~> 0.19")
      spec.add_runtime_dependency("docker-api", "~> 1.28")
      spec.add_runtime_dependency("activesupport", "~> 4.2")
      spec.add_runtime_dependency("simple-ansi", "~> 1.0")
      spec.add_runtime_dependency("pathutil", "~> 0.7")
      spec.add_runtime_dependency("extras", "~> 0.1")
      spec.add_runtime_dependency("json", "~> 1.8")
    end

@RochesterinNYC
Copy link
Contributor

@b-ggs this sounds related to #4487, could you take a look?

@envygeeks
Copy link
Author

@RochesterinNYC it seems like that is the issue and it's already fixed in master and just unreleased.

@segiddins
Copy link
Member

@envygeeks that work was shipped in 1.12.2

@envygeeks
Copy link
Author

@segiddins oh. Then it's still a problem because we are on the latest bundler.

@segiddins
Copy link
Member

Yup, confirmed, working on making our tests more robust. Thanks for the excellent bug report!

@segiddins
Copy link
Member

@envygeeks #4598 should fix it!

homu added a commit that referenced this issue May 24, 2016
[CLI] Only redirect to help when first two args are help and exec

Closes #4596.

\c @RochesterinNYC @b-ggs
segiddins pushed a commit that referenced this issue May 25, 2016
[CLI] Only redirect to help when first two args are help and exec

Closes #4596.

\c @RochesterinNYC @b-ggs
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