diff options
| author | Jack Nagel | 2014-09-07 17:11:20 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-09-07 17:12:21 -0500 |
| commit | 12417a3f8f33a9846184c0ee80c3b11cdf781073 (patch) | |
| tree | 5bc38bbe4a92a5acd4ec9711420a248dab9669c5 /Library | |
| parent | 5e9c7b26f01f17cbfb064532840e17bc80157517 (diff) | |
| download | homebrew-12417a3f8f33a9846184c0ee80c3b11cdf781073.tar.bz2 | |
gist-logs: always post config and doctor output
Closes #32145.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-gist-logs.rb | 24 |
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 |
