From bba85b4bd9754766edb723bbb67375980ba64bdc Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 9 Nov 2012 14:04:05 -0600 Subject: Formula#system: don't try to close a closed stream The new formula debugger users continuations to jump back up the stack, and thus anything that has the potential to be executed twice (i.e. ensure blocks) needs to to be essentially idempotent. Signed-off-by: Jack Nagel --- Library/Homebrew/formula.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index a76740ef7..f68df9d74 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -552,7 +552,7 @@ protected rescue ErrorDuringExecution => e raise BuildError.new(self, cmd, args, $?) ensure - f.close if f + f.close if f and not f.closed? removed_ENV_variables.each do |key, value| ENV[key] = value end if removed_ENV_variables -- cgit v1.2.3