fnm
fnm copied to clipboard
Print a message if a newer version of fnm is available
Hi there! Thank you for this awesome project 🔥
I found this useful feature in the GitHub CLI application and I liked it. Also, I found 2 useful crates to implement that:
- https://github.com/tarikeshaq/update-notifier
- https://github.com/mgrachev/update-informer
What do you think about it?
That's interesting but that is one more network request that can make stuff slow. Most of what fnm does is on the local filesystem. We can of course run it in a different thread and abort if it is not completing but I doubt that it will ever be slow enough to print the message, and making fnm slower is not an option. Do you have another idea for this that wouldn't sacrifice performance (& avoids being annoying)?
Another thing to think about: this feels like a task for package managers.
Do you have another idea for this that wouldn't sacrifice performance (& avoids being annoying)?
As an option, we can add an additional flag --check-updates
and start checking updates only if there is this flag, for example:
$ fnm --check-updates
Or we can also start checking only at the end of the program, when all the most important has already been executed. Both projects allow us to configure the frequency of requests, for example once a day.
Another thing to think about: this feels like a task for package managers.
Partly you are right, but fnm
can be installed without the use of package managers using the installation script.