From b83787b1ceb4441362fd3d966ce099e360a48646 Mon Sep 17 00:00:00 2001 From: bronzdoc Date: Sun, 30 Aug 2020 23:59:38 -0600 Subject: [PATCH] [rubygems/rubygems] Make --dry-run flag consistent across rubygems commands https://github.com/rubygems/rubygems/commit/addc644cad --- lib/rubygems/commands/cleanup_command.rb | 2 +- test/rubygems/test_gem_commands_cleanup_command.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rubygems/commands/cleanup_command.rb b/lib/rubygems/commands/cleanup_command.rb index b9819a4f96..996733cef7 100644 --- a/lib/rubygems/commands/cleanup_command.rb +++ b/lib/rubygems/commands/cleanup_command.rb @@ -10,7 +10,7 @@ class Gem::Commands::CleanupCommand < Gem::Command :force => false, :install_dir => Gem.dir, :check_dev => true - add_option('-n', '-d', '--dryrun', + add_option('-n', '-d', '--dry-run', 'Do not uninstall gems') do |value, options| options[:dryrun] = true end diff --git a/test/rubygems/test_gem_commands_cleanup_command.rb b/test/rubygems/test_gem_commands_cleanup_command.rb index 087d84710f..47d953d4dd 100644 --- a/test/rubygems/test_gem_commands_cleanup_command.rb +++ b/test/rubygems/test_gem_commands_cleanup_command.rb @@ -22,7 +22,7 @@ class TestGemCommandsCleanupCommand < Gem::TestCase end def test_handle_options_dry_run - @cmd.handle_options %w[--dryrun] + @cmd.handle_options %w[--dry-run] assert @cmd.options[:dryrun] end