pomdtr / sunbeam

Elevate Your Command Line Experience.
https://sunbeam.sh
MIT License
272 stars 12 forks source link

Issue with corrupted `history.json` #90

Open b-per opened 6 months ago

b-per commented 6 months ago

I just installed the latest version of sunbeam after skipping a few and I am moving my extensions to work with the recent changes.

At some point, i kept getting the error: Error: invalid character '1' after top-level value with any sunbeam command.

After some investigation, my ~/.cache/sunbeam/history.json didn't contain valid JSON anymore. I deleted it and sunbeam worked again.

There might be a small bug somewhere that leads to corrupted history and it would be great if issues with JSON parsing, like this one or other, could provide the path of the file with issues to make it easier to troubleshoot.

pomdtr commented 6 months ago

Sorry for the trouble.

Sunbeam is still unstable right now, so expect some breakage. I'll improve the error messages of these functions