CTRL-C for a child process should interrupt brew too
This commit is contained in:
parent
dd7bdce89c
commit
480bfa3793
@ -151,8 +151,11 @@ private
|
|||||||
# Kernel.system but with exceptions
|
# Kernel.system but with exceptions
|
||||||
def safe_system cmd, *args
|
def safe_system cmd, *args
|
||||||
puts "#{cmd} #{args*' '}" if ARGV.verbose?
|
puts "#{cmd} #{args*' '}" if ARGV.verbose?
|
||||||
# stderr is shown, so hopefully that will explain the problem
|
|
||||||
raise ExecutionError.new(cmd, args) unless Kernel.system cmd, *args and $? == 0
|
execd=Kernel.system cmd, *args
|
||||||
|
# somehow Ruby doesn't handle the CTRL-C from another process -- WTF!?
|
||||||
|
raise Interrupt, cmd if $?.termsig == 2
|
||||||
|
raise ExecutionError.new(cmd, args) unless execd and $? == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
def curl url, *args
|
def curl url, *args
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user