pulsar-edit / ppm

Pulsar Package Manager
MIT License
35 stars 13 forks source link

Fix placement of `setTimeout` #118

Closed savetheclocktower closed 8 months ago

savetheclocktower commented 8 months ago

The command was hanging because setTimeout was being called over and over, rather than just as needed (because the tag wasn't available yet). The setTimeout started out in one wrong place and then I “fixed” it by moving the setTimeout to a different wrong place.

There is a separate issue here: the API calls to GitHub could fail for any number of reasons. One reason they failed for me was because I exceeded the unauthenticated rate limit! This command should at least handle the error cases, but I believe it can also use the very auth token we use for the package backend in order to enable a much higher rate limit. Both of those are worth doing, but I'll save them for a different PR.