{"action":"created","issue":{"url":"https://api.github.com/repos/manastech/crystal/issues/1555","labels_url":"https://api.github.com/repos/manastech/crystal/issues/1555/labels{/name}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/1555/comments","events_url":"https://api.github.com/repos/manastech/crystal/issues/1555/events","html_url":"https://github.com/manastech/crystal/issues/1555","id":107707031,"number":1555,"title":"`crystal init lib foo` creates a dir even when `foo` directory already exits","user":{"login":"vjdhama","id":2221174,"avatar_url":"https://avatars.githubusercontent.com/u/2221174?v=3","gravatar_id":"","url":"https://api.github.com/users/vjdhama","html_url":"https://github.com/vjdhama","followers_url":"https://api.github.com/users/vjdhama/followers","following_url":"https://api.github.com/users/vjdhama/following{/other_user}","gists_url":"https://api.github.com/users/vjdhama/gists{/gist_id}","starred_url":"https://api.github.com/users/vjdhama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjdhama/subscriptions","organizations_url":"https://api.github.com/users/vjdhama/orgs","repos_url":"https://api.github.com/users/vjdhama/repos","events_url":"https://api.github.com/users/vjdhama/events{/privacy}","received_events_url":"https://api.github.com/users/vjdhama/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/manastech/crystal/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/manastech/crystal/labels/compiler","name":"compiler","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-22T12:44:17Z","updated_at":"2015-09-22T12:53:43Z","closed_at":null,"body":"I created a directory `foo` with a file `foo.txt`. Then i tried running `crystal init lib foo`. I think this should have failed, but it did not. It adds `foo.txt` inside `foo` directory with all other lib files. You can see `foo.txt` inside foo.\r\n\r\n```\r\n$ mkdir foo\r\n\r\n$ touch foo/foo.txt\r\n\r\n$ crystal init lib Foo\r\n      create  Foo/.gitignore\r\n      create  Foo/LICENSE\r\n      create  Foo/README.md\r\n      create  Foo/.travis.yml\r\n      create  Foo/shard.yml\r\n      create  Foo/src/Foo.cr\r\n      create  Foo/src/Foo/version.cr\r\n      create  Foo/spec/spec_helper.cr\r\n      create  Foo/spec/Foo_spec.cr\r\nInitialized empty Git repository in /Users/vjdhama/Work/crystal/foo/.git/\r\n\r\n$ ls\r\nfirst.cr       foo \r\n\r\n$ ls foo\r\nLICENSE   README.md foo.txt   shard.yml spec      src\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/manastech/crystal/issues/comments/142278847","html_url":"https://github.com/manastech/crystal/issues/1555#issuecomment-142278847","issue_url":"https://api.github.com/repos/manastech/crystal/issues/1555","id":142278847,"user":{"login":"vjdhama","id":2221174,"avatar_url":"https://avatars.githubusercontent.com/u/2221174?v=3","gravatar_id":"","url":"https://api.github.com/users/vjdhama","html_url":"https://github.com/vjdhama","followers_url":"https://api.github.com/users/vjdhama/followers","following_url":"https://api.github.com/users/vjdhama/following{/other_user}","gists_url":"https://api.github.com/users/vjdhama/gists{/gist_id}","starred_url":"https://api.github.com/users/vjdhama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjdhama/subscriptions","organizations_url":"https://api.github.com/users/vjdhama/orgs","repos_url":"https://api.github.com/users/vjdhama/repos","events_url":"https://api.github.com/users/vjdhama/events{/privacy}","received_events_url":"https://api.github.com/users/vjdhama/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T12:53:43Z","updated_at":"2015-09-22T12:53:43Z","body":"@jhass I also think they should be resolved together. The other issue didn't have info about this issue. That's why I referenced it. "}}