Only pass a single argument to Kernel.exec.
[ruby-vorbistagger.git] / rake / configuretask.rb
index 9a20f794f59c7ed0445e40ccd9e13c67766b0961..2078da41a1eada92eb991b0237d91293732750c4 100644 (file)
@@ -147,13 +147,15 @@ module Rake
                                        begin
                                                exec(bin)
                                        rescue SystemCallError
-                                               exit 0xb00bface
+                                               exit 255
+                                       ensure
+                                               tf.close
                                        end
                                end
 
                                Process.wait
 
-                               $?.exitstatus != 0xb00bface
+                               $?.exitstatus != 255
                        end
                end
 
@@ -203,14 +205,15 @@ module Rake
                        def initialize(name, opts = {})
                                super
 
-                               @command = "pkg-config --silence-errors"
+                               @command = "pkg-config"
                        end
 
                        protected
                        def lookup_flags(f)
                                f = :modversion if f == :version
 
-                               tmp = `#{@command} --#{f} #{@name}`.strip.tr("\n", "/")
+                               tmp = `#{@command} --silence-errors --#{f} #{@name}`.
+                                     strip.tr("\n", "/")
                                $?.exitstatus.zero? ? tmp : nil
                        end
                end