Skip to content

Commit b1559ba

Browse files
Corner, Bradleysergiomb2
authored andcommitted
Fix warnings for exit command
1 parent 31d6065 commit b1559ba

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/svn2git/migration.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@ def get_branches
261261
end
262262

263263
def get_rebasebranch
264-
get_branches
264+
get_branches
265265
@local = @local.find_all{|l| l == @options[:rebasebranch]}
266266
@remote = @remote.find_all{|r| r.include? @options[:rebasebranch]}
267267

268-
if @local.count > 1
268+
if @local.count > 1
269269
pp "To many matching branches found (#{@local})."
270270
exit 1
271271
elsif @local.count == 0
@@ -448,7 +448,7 @@ def run_command(cmd, exit_on_error=true, printout_output=false)
448448

449449
if exit_on_error && $?.exitstatus != 0
450450
$stderr.puts "command failed:\n#{cmd}"
451-
exit -1
451+
exit(1)
452452
end
453453

454454
ret
@@ -468,7 +468,7 @@ def verify_working_tree_is_clean
468468
status = run_command('git status --porcelain --untracked-files=no')
469469
unless status.strip == ''
470470
puts 'You have local pending changes. The working tree must be clean in order to continue.'
471-
exit -1
471+
exit(1)
472472
end
473473
end
474474

@@ -488,4 +488,3 @@ def git_config_command
488488

489489
end
490490
end
491-

0 commit comments

Comments
 (0)