{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxelib/issues/161","labels_url":"https://api.github.com/repos/HaxeFoundation/haxelib/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxelib/issues/161/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxelib/issues/161/events","html_url":"https://github.com/HaxeFoundation/haxelib/issues/161","id":54004614,"number":161,"title":"Error when attempting to use ~/.haxelib/ as library directory","user":{"login":"lostfictions","id":567041,"avatar_url":"https://avatars.githubusercontent.com/u/567041?v=3","gravatar_id":"","url":"https://api.github.com/users/lostfictions","html_url":"https://github.com/lostfictions","followers_url":"https://api.github.com/users/lostfictions/followers","following_url":"https://api.github.com/users/lostfictions/following{/other_user}","gists_url":"https://api.github.com/users/lostfictions/gists{/gist_id}","starred_url":"https://api.github.com/users/lostfictions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostfictions/subscriptions","organizations_url":"https://api.github.com/users/lostfictions/orgs","repos_url":"https://api.github.com/users/lostfictions/repos","events_url":"https://api.github.com/users/lostfictions/events{/privacy}","received_events_url":"https://api.github.com/users/lostfictions/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"ncannasse","id":1022912,"avatar_url":"https://avatars.githubusercontent.com/u/1022912?v=3","gravatar_id":"","url":"https://api.github.com/users/ncannasse","html_url":"https://github.com/ncannasse","followers_url":"https://api.github.com/users/ncannasse/followers","following_url":"https://api.github.com/users/ncannasse/following{/other_user}","gists_url":"https://api.github.com/users/ncannasse/gists{/gist_id}","starred_url":"https://api.github.com/users/ncannasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncannasse/subscriptions","organizations_url":"https://api.github.com/users/ncannasse/orgs","repos_url":"https://api.github.com/users/ncannasse/repos","events_url":"https://api.github.com/users/ncannasse/events{/privacy}","received_events_url":"https://api.github.com/users/ncannasse/received_events","type":"User","site_admin":false},"milestone":null,"comments":16,"created_at":"2015-01-11T20:57:29Z","updated_at":"2015-12-22T13:05:59Z","closed_at":"2015-12-22T13:03:53Z","body":"When running `haxelib setup`, if you try to use `~/.haxelib/` as the path to the local repository, it will fail with the ambiguous error `Is a directory.` What's more, trying to run `haxelib setup` again and choosing a different directory will fail until `~/.haxelib/` is removed.\r\n\r\nIf I had to guess, I'd say [`getRepository` in Main.hx](https://github.com/HaxeFoundation/haxelib/blob/master/src/tools/haxelib/Main.hx#L731) isn't handling the case where `.haxelib` is a directory, which I guess is a pretty simple fix.\r\n\r\nAt a higher level, though, forbidding the use of `~/.haxelib` as a repository path strikes me as unexpected behaviour. Most package managers I know of actually default to a similar convention: `npm` saves packages to `~/.npm`, `cabal` saves to `~/.cabal`, `gem` has `~/.gem`, `cargo` is `~/.cargo`, etc. I think it would make sense if haxelib permitted following suit. I'm not sure how doable that is given the established convention, though."},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxelib/issues/comments/166612019","html_url":"https://github.com/HaxeFoundation/haxelib/issues/161#issuecomment-166612019","issue_url":"https://api.github.com/repos/HaxeFoundation/haxelib/issues/161","id":166612019,"user":{"login":"ncannasse","id":1022912,"avatar_url":"https://avatars.githubusercontent.com/u/1022912?v=3","gravatar_id":"","url":"https://api.github.com/users/ncannasse","html_url":"https://github.com/ncannasse","followers_url":"https://api.github.com/users/ncannasse/followers","following_url":"https://api.github.com/users/ncannasse/following{/other_user}","gists_url":"https://api.github.com/users/ncannasse/gists{/gist_id}","starred_url":"https://api.github.com/users/ncannasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncannasse/subscriptions","organizations_url":"https://api.github.com/users/ncannasse/orgs","repos_url":"https://api.github.com/users/ncannasse/repos","events_url":"https://api.github.com/users/ncannasse/events{/privacy}","received_events_url":"https://api.github.com/users/ncannasse/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T13:05:59Z","updated_at":"2015-12-22T13:05:59Z","body":"@nadako did you add proper error messages when trying to save .haxelib and it's a directory ?"}}