Open lightmare opened 5 years ago
I did not write the updating support. But I vaguely think it may be triggered in the case that the binary has been cached locally but it is being also checked remotely? But overall, if it was broken for so longer and nobody noticed/complained them it may actually be find to remove the support. The usecase of having things locally and updating is one I handle by rm -rf mason_packages/ && mason install ...
I prefer not re-downloading what I already have; especially when I'm on slow limited connection. That's why I symlink mason_packages/.binaries
to ~/.cache/mapbox/mason.binaries
(which mason should be using by default, IMO, but that's a different discussion).
I'm okay with skipping the remote check by default, if the local file already exists. But as long as packages can be re-published under the same version number, there should be some way to force this cheap check (curl -z aka If-Modified-Since).
which mason should be using by default, IMO, but that's a different discussion).
Yes, I've often wanted this, just not had time to write tests for it.
I'm okay with skipping the remote check by default, if the local file already exists.
👌
But as long as packages can be re-published under the same version number, there should be some way to force this cheap check (curl -z aka If-Modified-Since).
Right. As previously discussed, we tried to get away from that. Or at least it should be so rare that it should not need to be supported locally with re-fetching.
Before af24915ba36c57ef7133023eb55148712a6023f1 the message was:
the script was broken, and the message could not be trusted, because it didn't actually check the package URL.
After af24915ba36c57ef7133023eb55148712a6023f1 it is:
Now it actually checks the URL, but then says it's not available. I'd assume curl should succeed with HTTP status 304 Not Modified, but it appears to work differently.