Skip to content

Commit e5759e4

Browse files
committed
redmine-backporter.rb: Print help on wrong usage
1 parent 1eff5a9 commit e5759e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tool/redmine-backporter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ module Readline; end
3535
$openuri_options = {}
3636
$openuri_options[:ssl_verify_mode] = OpenSSL::SSL::VERIFY_NONE unless ssl_verify
3737

38-
TARGET_VERSION = target_version || ENV['TARGET_VERSION'] || (raise 'need to specify TARGET_VERSION')
38+
TARGET_VERSION = target_version || ENV['TARGET_VERSION'] || (puts opts.help; raise 'need to specify TARGET_VERSION')
3939
RUBY_REPO_PATH = repo_path || ENV['RUBY_REPO_PATH']
4040
BACKPORT_CF_KEY = 'cf_5'
4141
STATUS_CLOSE = 5
42-
REDMINE_API_KEY = api_key || ENV['REDMINE_API_KEY'] || (raise 'need to specify REDMINE_API_KEY')
42+
REDMINE_API_KEY = api_key || ENV['REDMINE_API_KEY'] || (puts opts.help; raise 'need to specify REDMINE_API_KEY')
4343
REDMINE_BASE = 'https://bugs.ruby-lang.org'
4444

4545
@query = {

0 commit comments

Comments
 (0)