Bit of an oversight on my part, but I'm testing th...
# contributing
r
Bit of an oversight on my part, but I'm testing the new
meltano init
behaviour in practice and found it doesn't work in a `git clone`d directory because (obviously) it contains a
.git
directory. 🥴
Copy code
reuben@reuben-Inspiron-14-5425:~/Documents/meltano/meltano$ cd /tmp/
reuben@reuben-Inspiron-14-5425:/tmp$ git clone git@github.com:ReubenFrankel/my_meltano_project.git
Cloning into 'my_meltano_project'...
warning: You appear to have cloned an empty repository.
reuben@reuben-Inspiron-14-5425:/tmp$ meltano init my_meltano_project
Need help fixing this problem? Visit <http://melta.no/> for troubleshooting steps, or to
join our friendly Slack community.

Directory 'my_meltano_project' not empty.
reuben@reuben-Inspiron-14-5425:/tmp$ ls -a my_meltano_project
.  ..  .git
reuben@reuben-Inspiron-14-5425:/tmp$
In the original issue, one of the use-cases I described was to be able to
meltano init
straight into a directory cloned from an empty GitHub repo, but I guess I just completely forgot about this when working on the feature. Upside is the core feature does work as currently described/documented, but it's not as useful as I originally intended. Would you guys accept a "fix" for this as something like ignoring hidden files/directories (
.
-prefixed) during the empty directory check? I thought about just whitelisting
.git
, but this doesn't feel like a particularly robust solution... Open to other suggestions.
a
What about
--force
(or similar) to ignore existing files/folders?
r
I think that's probably a better option since it's more explicit. There was some discussion about improving the onboarding experience in the issue, so I'm wondering how this would affect that. Personally, I will only use a
--force
type of option when I'm familiar enough with the command behaviour beforehand.