diff options
| author | Jack Nagel | 2012-11-09 14:04:05 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-11-09 14:04:08 -0600 |
| commit | bba85b4bd9754766edb723bbb67375980ba64bdc (patch) | |
| tree | e7329ffca33e2f2add1bd62371fd329ef39a012a | |
| parent | 3bdce1a7fa12ec9e779edb429971249fefe9a501 (diff) | |
| download | brew-bba85b4bd9754766edb723bbb67375980ba64bdc.tar.bz2 | |
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 <jacknagel@gmail.com>
| -rw-r--r-- | Library/Homebrew/formula.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
