Skip to content

Binstubs don't correctly handle bundler environment outside of Gemfile directory #67

Description

@skyethepinkcat

I think the issue is in gen-bin-stubs.rb:

if File.exist? "\#{Dir.pwd}/Gemfile"
   bundler_setup!
end

This means the bundler environment setup will only run if you're directly in the root of a repository with a Gemfile. As a result, gems like puppet won't be able to use gems that extend them like puppet-strings.

Reproduction

  1. Add gem 'puppet' and gem 'puppet-strings' to a gemfile and use ruby-nix with ruby 3.2
  2. run puppet help in the directory with your gemfile, and "strings" will appear as a subcommand.
  3. run puppet help in a subdirectory, and "strings" will not appear as a subcommand.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions