{"action":"created","issue":{"url":"https://api.github.com/repos/mafintosh/electron-prebuilt/issues/25","labels_url":"https://api.github.com/repos/mafintosh/electron-prebuilt/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/mafintosh/electron-prebuilt/issues/25/comments","events_url":"https://api.github.com/repos/mafintosh/electron-prebuilt/issues/25/events","html_url":"https://github.com/mafintosh/electron-prebuilt/issues/25","id":74835142,"number":25,"title":"Interrupted install leaves cache corrupted","user":{"login":"federicobond","id":138426,"avatar_url":"https://avatars.githubusercontent.com/u/138426?v=3","gravatar_id":"","url":"https://api.github.com/users/federicobond","html_url":"https://github.com/federicobond","followers_url":"https://api.github.com/users/federicobond/followers","following_url":"https://api.github.com/users/federicobond/following{/other_user}","gists_url":"https://api.github.com/users/federicobond/gists{/gist_id}","starred_url":"https://api.github.com/users/federicobond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/federicobond/subscriptions","organizations_url":"https://api.github.com/users/federicobond/orgs","repos_url":"https://api.github.com/users/federicobond/repos","events_url":"https://api.github.com/users/federicobond/events{/privacy}","received_events_url":"https://api.github.com/users/federicobond/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-10T05:11:27Z","updated_at":"2015-05-10T06:58:25Z","closed_at":null,"body":"This happens because it attempts to extract a zip file that has only been partially downloaded. We should support download resume or clear the cache if the install was interrupted. I believe the second would be more in line with user expectations.\r\n\r\nEither way, I believe it should be more transparent about the fact that we it's creating a cache directory in `~/.electron`. Even though I suspected my problem involved caching, I had to dig into the code to find out where this cache was.\r\n\r\n````\r\n> electron-prebuilt@0.25.3 install /Users/federicobond/code/forks/electron-prebuilt\r\n> node install.js\r\n\r\n/Users/federicobond/code/forks/electron-prebuilt/install.js:18\r\n  throw err\r\n        ^\r\nError: end of central directory record signature not found\r\n    at /Users/federicobond/code/forks/electron-prebuilt/node_modules/extract-zip/node_modules/yauzl/index.js:98:14\r\n    at /Users/federicobond/code/forks/electron-prebuilt/node_modules/extract-zip/node_modules/yauzl/index.js:342:5\r\n    at /Users/federicobond/code/forks/electron-prebuilt/node_modules/extract-zip/node_modules/yauzl/node_modules/fd-slicer/index.js:32:7\r\n    at FSReqWrap.wrapper [as oncomplete] (fs.js:527:17)\r\n````"},"comment":{"url":"https://api.github.com/repos/mafintosh/electron-prebuilt/issues/comments/100596286","html_url":"https://github.com/mafintosh/electron-prebuilt/issues/25#issuecomment-100596286","issue_url":"https://api.github.com/repos/mafintosh/electron-prebuilt/issues/25","id":100596286,"user":{"login":"federicobond","id":138426,"avatar_url":"https://avatars.githubusercontent.com/u/138426?v=3","gravatar_id":"","url":"https://api.github.com/users/federicobond","html_url":"https://github.com/federicobond","followers_url":"https://api.github.com/users/federicobond/followers","following_url":"https://api.github.com/users/federicobond/following{/other_user}","gists_url":"https://api.github.com/users/federicobond/gists{/gist_id}","starred_url":"https://api.github.com/users/federicobond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/federicobond/subscriptions","organizations_url":"https://api.github.com/users/federicobond/orgs","repos_url":"https://api.github.com/users/federicobond/repos","events_url":"https://api.github.com/users/federicobond/events{/privacy}","received_events_url":"https://api.github.com/users/federicobond/received_events","type":"User","site_admin":false},"created_at":"2015-05-10T06:58:25Z","updated_at":"2015-05-10T06:58:25Z","body":"Right. I meant removing the `.electron` directory *after* an interrupted install, if no other files remain in the cache."}}