Skip to content

Commit

Permalink
! Fix error seen when this gem installed but not specified as depende…
Browse files Browse the repository at this point in the history
…ncy in project
  • Loading branch information
PikachuEXE committed Dec 18, 2024
1 parent 5b274f8 commit dc0b3ce
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions lib/rubygems_plugin.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
require 'gem/release'
require 'rubygems/command_manager'
begin
require 'gem/release'
require 'rubygems/command_manager'

require 'rubygems/commands/bootstrap_command'
require 'rubygems/commands/bump_command'
require 'rubygems/commands/gemspec_command'
require 'rubygems/commands/release_command'
require 'rubygems/commands/tag_command'
require 'rubygems/commands/bootstrap_command'
require 'rubygems/commands/bump_command'
require 'rubygems/commands/gemspec_command'
require 'rubygems/commands/release_command'
require 'rubygems/commands/tag_command'

Gem::CommandManager.instance.register_command :bootstrap
Gem::CommandManager.instance.register_command :bump
Gem::CommandManager.instance.register_command :gemspec
Gem::CommandManager.instance.register_command :release
Gem::CommandManager.instance.register_command :tag
Gem::CommandManager.instance.register_command :bootstrap
Gem::CommandManager.instance.register_command :bump
Gem::CommandManager.instance.register_command :gemspec
Gem::CommandManager.instance.register_command :release
Gem::CommandManager.instance.register_command :tag
rescue LoadError
# Plugin is sometimes run even on projects without this gem specified as dependency
end

0 comments on commit dc0b3ce

Please sign in to comment.