b85c72b5f6ed1d33414cc2d9e7afceef12b861e7

Author
Tomasz Borek <Tomasz.Borek@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Better app error handling in curl (#5828)

Deals with app error page, saving true error instead.

Upon app failure, Heroku returns HTML "Application Error" page.
Finding HTML page in .gitignore is confusing, so I replaced
`-s` with `-f` in curl calls, which cuts such output.

Replace instead of addition as no progress meter outputs either.

It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.
      -- E. W. Dijkstra

Diff

 1diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh
 2index ba1b38711b8cda436ab91a177e4846b45c7189ca..f242169e4d3e8bdbe70cf5bf291ecbe725a9b51d 100644
 3--- a/plugins/gitignore/gitignore.plugin.zsh
 4+++ b/plugins/gitignore/gitignore.plugin.zsh
 5@@ -1,7 +1,7 @@
 6-function gi() { curl -sL https://www.gitignore.io/api/${(j:,:)@} }
 7+function gi() { curl -fL https://www.gitignore.io/api/${(j:,:)@} }
 8 
 9 _gitignoreio_get_command_list() {
10-  curl -sL https://www.gitignore.io/api/list | tr "," "\n"
11+  curl -fL https://www.gitignore.io/api/list | tr "," "\n"
12 }
13 
14 _gitignoreio () {