knownasilya / breach-module-manager

A module manager for Breach
9 stars 0 forks source link

Local cache isn't written after a fetch from npm #6

Open knownasilya opened 10 years ago

knownasilya commented 10 years ago

Should the results from npm be written to the local cache.json? Because you only get results if there is no cache.json after that there are no results.

mblarsen commented 10 years ago

The cache.json is always written if it is not there. Updated daily from NPM.

mblarsen commented 10 years ago

Thought we could add a force update option. But there is really no reason to go to NPM every time. Also not desirable. I'm living in the part of the world where 3G is still ten times faster than the most affordable Internet connection and updating NPM over 3G costs more than a dinner for 3. :P

knownasilya commented 10 years ago

Yeah, it seems it would, but I just get {}, although the search found modules..

knownasilya commented 10 years ago

I think we could split out the cache into a couple more modules, to make it more testable.

mblarsen commented 10 years ago

That is a bug. Worked nicely in my case. I'll have a look.

mblarsen commented 10 years ago

Got this:

[{"name":"breach-module-manager","description":"Module manager for Breach","dist-tags":{"latest":"0.0.1"},"maintainers":[{"name":"mblarsen","email":"mblarsen@gmail.com"}],"homepage":"https://github.com/mblarsen/breach-module-manager","keywords":["breach","breach-module"],"repository":{"type":"git","url":"https://github.com/mblarsen/breach-module-manager.git"},"author":{"name":"Michael Bøcker-Larsen","email":"mblarsen@gmail.com","url":"http://github.com/mblarsen"},"bugs":{"url":"https://github.com/mblarsen/breach-module-manager/issues"},"license":"MIT","readmeFilename":"README.md","time":{"modified":"2014-07-13T08:46:33.986Z"},"versions":{"0.0.1":"latest"}}]

Can it be a permission issue?

knownasilya commented 10 years ago

Seems like it, I have the following: -rw-r--r--@.. Not sure what the @ is.

mblarsen commented 10 years ago

It is something about extended attributes more info

mblarsen commented 10 years ago

You solved this issue?

knownasilya commented 10 years ago

It's the following xattr: com.apple.quarantine.. So the solution is to run xattr -d com.apple.quarantine cache.json. For some reason OSX adds this as a flag for malware check so the user can confirm, but I never got any confirmation.

https://discussions.apple.com/thread/3145071?tstart=0

knownasilya commented 10 years ago

I wonder if we can address this incase it happens (not sure if you can set xattr with fs), because a user won't necessarily know the issue..

mblarsen commented 10 years ago

could run an external process of on mac

Michael Bøcker-Larsen http://www.gofundme.com/plant-a-tree-api http://about.me/mblarsen

On Tuesday 15 July 2014 at 20:04, Ilya Radchenko wrote:

I wonder if we can address this incase it happens (not sure if you can set xattr with fs), because a user won't necessarily know the issue..

— Reply to this email directly or view it on GitHub (https://github.com/mblarsen/breach-module-manager/issues/6#issuecomment-49038046).

knownasilya commented 10 years ago

We could use fs-xattr. I'll make the change later tonight, and I'll close this issue once I implement that.