micha/resty

Help debugging resty on zsh with prezto

pedroxs opened this issue · 5 comments

I am getting the following exceptions when trying resty (latest master branch or v2.3).

~❯ curl -L https://raw.githubusercontent.com/micha/resty/master/resty > resty
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11021  100 11021    0     0  11021      0  0:00:01 --:--:--  0:00:01 27621
~❯ source resty
~❯ resty https://api.github.com -H "Accept: application/vnd.github.v3+json"
https://api.github.com*
~❯ GET /
resty-call:30: file exists: /home/pedroxs/.resty/host
resty-call:124: file exists: /tmp/tmp.gzG7ogJHy5/tmp.6k9IFD6BaO

~❯ GET / --dry-run
resty-call:30: file exists: /home/pedroxs/.resty/host
curl -sLv '' -X GET -b "/home/pedroxs/.resty/c/api.github.com" -c "/home/pedroxs/.resty/c/api.github.com" -H Accept:\ application/vnd.github.v3+json "https://api.github.com/"
~❯ 

I have prezto installed and believe it has something to do with the issue because if I switch to another user (without prezto) everything works fine. The problem is, I have no idea where to start looking to debug this.

I am running zsh 5.4.2 (x86_64-unknown-linux-gnu) with Manjaro Linux 4.11.12-1-rt16-MANJARO x86_64

Thanks

It seems you are using master, now 3.0 (I can tell because of the resty-call).

What is your prezto config?

My config for prezto. I just updated from remote and still getting same error.

Hey @AdrieanKhisbe where you able to take a look into this? Do have any tips or point me in a direction where I could debug this on my machine?

belak commented

I believe this is related to the noclobber option we set in prezto.

This can be overridden on a case by case basis by using >| rather than simply >, or locally disabling the setting (which isn't as easy to do if you're trying to support both bash and zsh)

@belak thanks for the help, I edited resty with your suggestion and it is working now! 👍

I will submit a PR with my changes so we may close this and related issue I opened on prezto repo.