molecule icon indicating copy to clipboard operation
molecule copied to clipboard

Fix config file in proj dirrectory

Open erichoog opened this issue 11 months ago • 0 comments

This resolves the issue raised in Issue #4142 where Molecule does not find the config.yml file the project directory {project_dir}/.config/molecule/config.yml but does find it in the home directory.

I ran tests by isolating the 2 functions being called when LOCAL_CONFIG variable is defined and verifying that the config file is found when in the project dir. If there is no {project_dir}/.config/molecule/config.yml then it looks in ~/.config/molecule/config.yml and finds the config file.

I have not been able to test the full project with the tox command as my environment is having issues. The tox tests are not completing even on a freshly cloned repo.

The code in the find_vcs_root function could likely be modified more as it does not appear to be called elsewhere and it searches for ".git", ".hg", ".svn" dirs as well for what appears to be no reason as far as I can tell since it is only used for locating .config/molecule/config.yml

Let me know if anything can be improved upon here with my delivery of this as it is my first PR with the project.

Fixes: #4142

erichoog avatar Feb 28 '24 23:02 erichoog