Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: guess project root dir with git, config file and cwd #1661

Merged
merged 1 commit into from Jul 13, 2021

Conversation

xabinapal
Copy link
Contributor

@xabinapal xabinapal commented Jul 12, 2021

Fix project directory guessing. It was reverting to user's home if could not find a valid git root repository or an .ansible-lint file. Now, it will use the CWD.

The guess order is based on #1654 (comment)

@ssbarnea ssbarnea merged commit 97d74ee into ansible:master Jul 13, 2021

if result.returncode != 0:
return str(Path.home())
path = result.stdout.splitlines()[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's best not to put more than one command inside and try-block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants