aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Burka2014-05-21 20:37:44 -0400
committerJack Nagel2014-05-22 20:49:26 -0500
commit840a5c74185ee44546008bd585c3e5edbfa9528c (patch)
treec20c4238eada02aa19d1f215a648a59f38807252
parentd69be7f6195dc8ec64bd4316690206c695a632ad (diff)
downloadbrew-840a5c74185ee44546008bd585c3e5edbfa9528c.tar.bz2
fix HTTP 422 when gist-logs sends an empty file
Closes Homebrew/homebrew#29476. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rwxr-xr-xLibrary/Contributions/cmd/brew-gist-logs.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Contributions/cmd/brew-gist-logs.rb b/Library/Contributions/cmd/brew-gist-logs.rb
index 7d4e1c110..28765a2e3 100755
--- a/Library/Contributions/cmd/brew-gist-logs.rb
+++ b/Library/Contributions/cmd/brew-gist-logs.rb
@@ -30,7 +30,7 @@ def load_logs name
logs = {}
dir = (HOMEBREW_LOGS/name)
dir.children.sort.each do |file|
- logs[file.basename.to_s] = {:content => file.read}
+ logs[file.basename.to_s] = {:content => (file.size == 0 ? "empty log" : file.read)}
end if dir.exist?
raise 'No logs.' if logs.empty?
logs