Skip to content

Commit 3e9d952

Browse files
JonRowebenoittgt
authored andcommitted
Fix ruby prompt script for case sensitivity and unknown options
1 parent e17c487 commit 3e9d952

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Rakefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,12 @@ def confirm_branch_name(name)
427427
return name unless system("git show-branch #{name} > /dev/null 2>&1")
428428

429429
puts "Branch #{name} already exists, delete? [Y/n] or rename new branch? [r[ename] <name>]"
430-
case STDIN.gets.downcase
431-
when /^y/
430+
case input = STDIN.gets.downcase
431+
when /^y/i
432432
`git branch -D #{name}`
433433
when /^r(?:ename)? (.*)$/
434434
name = $1
435+
when /^n/i
435436
else
436437
abort "Unknown option: #{input}"
437438
end

0 commit comments

Comments
 (0)