Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BREAKING] sepa_king v0.11.1 breaks rake CLI command #79

Closed
leoarnold opened this issue Oct 8, 2018 · 0 comments
Closed

[BREAKING] sepa_king v0.11.1 breaks rake CLI command #79

leoarnold opened this issue Oct 8, 2018 · 0 comments

Comments

@leoarnold
Copy link
Contributor

Given a project which uses RVM and has its own RVM gemset
when I install sepa_king v0.11.1 using bundle install,
then a binstub called rake(!) is created
thereby overwriting the binstub created by the rake gem itself.

The erroneously created binstub:

#!/usr/bin/env ruby_executable_hooks
#
# This file was generated by RubyGems.
#
# The application 'sepa_king' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0.a"

if ARGV.first
  str = ARGV.first
  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
    version = $1
    ARGV.shift
  end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('sepa_king', 'rake', version)
else
gem "sepa_king", version
load Gem.bin_path("sepa_king", "rake", version)
end

loads sepa_king/bin/rake which then loads rake/exe/rake
but the gem repository paths are not managed correctly,
resulting in error messages like

$ rake -T
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Could not find gem 'rspec' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.

even though bundle install will show that rspec was installed all along.

rogercampos pushed a commit to factorialco/sepa_king that referenced this issue Feb 16, 2023
The binstub bin/rake was accidentally added in
salesking@7cdb97b
and is prone to break projects using rake.

This commit removes the binstub as well as the executables file list
from the gemspec to prevent unintended additions of executables
in future commits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant