knqyf263 / pet

Simple command-line snippet manager
MIT License
4.41k stars 222 forks source link

pet version v0.8.1 overwrites snippets file #303

Closed makarono closed 3 months ago

makarono commented 3 months ago

Privileged issue

Issue Content

After the update to latest pet version v0.8.1 when executing "pet search" command it shows 0 commands. I had a snippets file backed up. I restored pet to previous version v0.7.1 and restored old snippets file and all worked fine. One again I upgraded to v0.8.1 and it again overwrited my snippets file and showed 0 snippets saved. I tried the "pet new" and it successfully saved 1 snippet into overwritten snippets file.

RamiAwar commented 3 months ago

Thanks for reporting this, also experience it locally

RamiAwar commented 3 months ago

Seems like the new toml library encoding doesn't then decode properly for some reason.

It's a pretty serious issue, so need to resolve asap. Will look into it a bit see if I can fix quickly, if not will revert to old library.

RamiAwar commented 3 months ago

Oh just spotted another bug. Man this new library is hard to work with.. hold off on updating until I comment here again.

RamiAwar commented 3 months ago

Okay try out 0.8.4 and let me know. It should be on brew.

brew update then brew upgrade pet

makarono commented 3 months ago

@RamiAwar Thank yo. I had some odd character in my snippets file "". Newest version of pet works and doesn't overwrites snippets file anymore

RamiAwar commented 3 months ago

Ah nice! Thank you for reporting this so quickly. It was indeed a hidden bug that only surfaced due to the recent update.