rmarquis / pacaur

[unmaintained] An AUR helper that minimizes user interaction
https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144
ISC License
796 stars 113 forks source link

"Failed to parse JSON" when .curlrc is used #753

Closed tumido closed 6 years ago

tumido commented 6 years ago
Version

pacaur -v

pacaur 4.7.10
Description

If Pacaur is run while custom .curlrc with a -w flag is present, Pacaur fails to parse JSON responses.

Output

pacaur -Syu

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
:: Starting AUR upgrade...
:: Failed to parse JSON
:: Failed to parse JSON
:: cower is not present in AUR -- skipping
:: pacaur is not present in AUR -- skipping
...
Debug output

bash -x pacaur <your command>

Attachment: out.txt

Curl config

I'm adding a -w flag since I use Curl on daily basis and I need to see some stats... cat .curlrc

-w "\n-----------------------------------------------------------------------\nstatus=%{http_code} %{redirect_url} size=%{size_download} time=%{time_total} content-type=\"%{content_type}\"\n"
Proposed solution

Use -q flag in Pacaur's calls of Curl to skip the user config file, or force empty -w flag.

Cheers Tom