{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node-gyp/issues/540","repository_url":"https://api.github.com/repos/nodejs/node-gyp","labels_url":"https://api.github.com/repos/nodejs/node-gyp/issues/540/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node-gyp/issues/540/comments","events_url":"https://api.github.com/repos/nodejs/node-gyp/issues/540/events","html_url":"https://github.com/nodejs/node-gyp/pull/540","id":50233227,"number":540,"title":"Ability to configure devDir with flag [#21]","user":{"login":"glosee","id":1557027,"avatar_url":"https://avatars.githubusercontent.com/u/1557027?v=3","gravatar_id":"","url":"https://api.github.com/users/glosee","html_url":"https://github.com/glosee","followers_url":"https://api.github.com/users/glosee/followers","following_url":"https://api.github.com/users/glosee/following{/other_user}","gists_url":"https://api.github.com/users/glosee/gists{/gist_id}","starred_url":"https://api.github.com/users/glosee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glosee/subscriptions","organizations_url":"https://api.github.com/users/glosee/orgs","repos_url":"https://api.github.com/users/glosee/repos","events_url":"https://api.github.com/users/glosee/events{/privacy}","received_events_url":"https://api.github.com/users/glosee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-11-26T22:18:10Z","updated_at":"2016-02-04T21:55:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/node-gyp/pulls/540","html_url":"https://github.com/nodejs/node-gyp/pull/540","diff_url":"https://github.com/nodejs/node-gyp/pull/540.diff","patch_url":"https://github.com/nodejs/node-gyp/pull/540.patch"},"body":"Potential fix for issue #21 that adds ability to use a flag called `--dev-dir`, and a check for `XDG_CACHE_DIR` before `HOME`.\r\n\r\nThe `--dev-dir` flag is the be-all-end-all result. If this flag is not used, then the application looks for `XDG_CACHE_DIR` first, then `HOME`, then `USERPROFILE` as it used to."},"comment":{"url":"https://api.github.com/repos/nodejs/node-gyp/issues/comments/180068914","html_url":"https://github.com/nodejs/node-gyp/pull/540#issuecomment-180068914","issue_url":"https://api.github.com/repos/nodejs/node-gyp/issues/540","id":180068914,"user":{"login":"jasonkarns","id":119972,"avatar_url":"https://avatars.githubusercontent.com/u/119972?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonkarns","html_url":"https://github.com/jasonkarns","followers_url":"https://api.github.com/users/jasonkarns/followers","following_url":"https://api.github.com/users/jasonkarns/following{/other_user}","gists_url":"https://api.github.com/users/jasonkarns/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonkarns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonkarns/subscriptions","organizations_url":"https://api.github.com/users/jasonkarns/orgs","repos_url":"https://api.github.com/users/jasonkarns/repos","events_url":"https://api.github.com/users/jasonkarns/events{/privacy}","received_events_url":"https://api.github.com/users/jasonkarns/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T21:55:55Z","updated_at":"2016-02-04T21:55:55Z","body":"> For one, the way it's done in this PR would force everyone to download tarballs again (because the cache directory changes) when it's released.\r\n\r\nThat's a valid reason against the way this PR is written, but I don't think it's necessarily a strike against XDG_CACHE_HOME in principle.\r\n\r\nAn option is to choose the directory based on which one *exists* and not by which env var is set (in the order I [listed](https://github.com/nodejs/node-gyp/pull/540#issuecomment-180057762)). This would prevent re-downloading everything. And it would allow a manual (one-time) opt-in for users to just move their `~/.node-gyp` dir into the XDG location if desired.\r\n\r\nIf none of the directories already exist, then choose (and create) the directory based on the env vars."}}