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
- Add
gem 'puppet' and gem 'puppet-strings' to a gemfile and use ruby-nix with ruby 3.2
- run
puppet help in the directory with your gemfile, and "strings" will appear as a subcommand.
- run
puppet help in a subdirectory, and "strings" will not appear as a subcommand.
I think the issue is in gen-bin-stubs.rb:
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
puppetwon't be able to use gems that extend them likepuppet-strings.Reproduction
gem 'puppet'andgem 'puppet-strings'to a gemfile and use ruby-nix with ruby 3.2puppet helpin the directory with your gemfile, and "strings" will appear as a subcommand.puppet helpin a subdirectory, and "strings" will not appear as a subcommand.