mongolab / mongoctl

Manage MongoDB servers and replica sets using JSON configurations!
MIT License
178 stars 25 forks source link

Continue creating sample files even if .mongoctl dir exists #44

Closed lukech closed 6 years ago

lukech commented 6 years ago

Sometimes users could run into "mongoctl error: Config file /Users//.mongoctl/mongoctl.config does not exist." while running basic commands after installation.

It's because setup.py found ~/.mongoctl directory was created, while not those sample config files, which could happen in some race conditions e.g. an incomplete/messy un-installation followed by another installation.

Feel it could be safer to always attempt to create sample config files, even though the ~/.mongoctl directory has been created in setup.py, not a big deal in terms of performance impact.