aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions/cmd
diff options
context:
space:
mode:
authorJack Nagel2014-09-07 17:11:20 -0500
committerJack Nagel2014-09-07 17:12:21 -0500
commit793b58a68618dc21f6143aaf708f93efb5ed17c6 (patch)
tree5e4f3f067a3ee7b262c2909344efd17f78fdd6e4 /Library/Contributions/cmd
parent1dd924b9bd843a20f232272a2958e2c61fbc1a3d (diff)
downloadbrew-793b58a68618dc21f6143aaf708f93efb5ed17c6.tar.bz2
gist-logs: always post config and doctor output
Closes Homebrew/homebrew#32145.
Diffstat (limited to 'Library/Contributions/cmd')
-rwxr-xr-xLibrary/Contributions/cmd/brew-gist-logs.rb24
1 files changed, 5 insertions, 19 deletions
diff --git a/Library/Contributions/cmd/brew-gist-logs.rb b/Library/Contributions/cmd/brew-gist-logs.rb
index 66fcd30f9..b2357ef60 100755
--- a/Library/Contributions/cmd/brew-gist-logs.rb
+++ b/Library/Contributions/cmd/brew-gist-logs.rb
@@ -15,8 +15,10 @@ def gist_logs f
files = load_logs(f.name)
- append_config(files) if ARGV.include? '--config'
- append_doctor(files) if ARGV.include? '--doctor'
+ s = StringIO.new
+ Homebrew.dump_verbose_config(s)
+ files["config.out"] = { :content => s.string }
+ files["doctor.out"] = { :content => `brew doctor 2>&1` }
url = create_gist(files)
@@ -38,16 +40,6 @@ def load_logs name
logs
end
-def append_config files
- s = StringIO.new
- Homebrew.dump_verbose_config(s)
- files["config.out"] = { :content => s.string }
-end
-
-def append_doctor files
- files['doctor.out'] = {:content => `brew doctor 2>&1`}
-end
-
def create_gist files
post("/gists", "public" => true, "files" => files)["html_url"]
end
@@ -92,14 +84,8 @@ def post path, data
Utils::JSON.load(body)
end
-def usage
- puts "usage: brew gist-logs [options] <formula>"
- puts
- puts "options: --config, --doctor, --new-issue"
-end
-
if ARGV.formulae.length != 1
- usage
+ puts "usage: brew gist-logs [--new-issue] <formula>"
exit 1
end