projects
/
ruby-vorbistagger.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0b896e8
)
Fixed error handling in Rake::ConfigureTask::FooConfigTest#lookup_flags.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Tue, 15 Aug 2006 16:20:21 +0000
(18:20 +0200)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Wed, 23 Aug 2006 17:33:53 +0000
(19:33 +0200)
rake/configuretask.rb
patch
|
blob
|
history
diff --git
a/rake/configuretask.rb
b/rake/configuretask.rb
index 08a4ebc376ce76a9f9ebeaeddbc84ddc59e94dba..b673c84a8b45fa770a75b23fc999443a76b1d24a 100644
(file)
--- a/
rake/configuretask.rb
+++ b/
rake/configuretask.rb
@@
-178,17
+178,23
@@
module Rake
def invoke
return false unless can_exec_command?
def invoke
return false unless can_exec_command?
- [:version, :cflags, :libs].each do |f|
- @result[f] = lookup_flags(f)
+ begin
+ [:version, :cflags, :libs].each do |f|
+ @result[f] = lookup_flags(f)
+ end
+ rescue Exception
+ @result.clear
end
end
- true
+ !@result.empty?
end
protected
def lookup_flags(f)
tmp = `#{@command} --#{f}`.strip
end
protected
def lookup_flags(f)
tmp = `#{@command} --#{f}`.strip
- $?.exitstatus.zero? ? tmp : nil
+
+ raise unless $?.exitstatus.zero?
+ tmp
end
private
end
private
@@
-210,7
+216,9
@@
module Rake
tmp = `#{@command} --silence-errors --#{f} #{@name}`.
strip.tr("\n", "/")
tmp = `#{@command} --silence-errors --#{f} #{@name}`.
strip.tr("\n", "/")
- $?.exitstatus.zero? ? tmp : nil
+
+ raise unless $?.exitstatus.zero?
+ tmp
end
end
end
end