From 0c8872724b2d21eb43f87ed65d4bb481dff505f8 Mon Sep 17 00:00:00 2001 From: LIttleAncientForestKami Date: Sun, 29 Jan 2017 12:20:15 +0100 Subject: [PATCH] Better app error handling in curl 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 --- plugins/gitignore/gitignore.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index ba1b3871..f242169e 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,7 +1,7 @@ -function gi() { curl -sL https://www.gitignore.io/api/${(j:,:)@} } +function gi() { curl -fL https://www.gitignore.io/api/${(j:,:)@} } _gitignoreio_get_command_list() { - curl -sL https://www.gitignore.io/api/list | tr "," "\n" + curl -fL https://www.gitignore.io/api/list | tr "," "\n" } _gitignoreio () {