Skip to content

Better directory existence check to avoid empty paths in exception #113

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

Merged
merged 1 commit into from
Jul 30, 2016
Merged

Conversation

neemzy
Copy link
Contributor

@neemzy neemzy commented Jul 27, 2016

When initializing a Repository instance, if the specified directory doesn't exist, the realpath call with return false and overwrite the old value, which prevents it from being displayed in the exception. This does the trick.

Also, I added PHPUnit as a development dependency and wrote a quick how-to to run tests.

@@ -29,7 +29,8 @@
"symfony/process": "^2.3|^3.0"
},
"require-dev": {
"psr/log": "^1.0"
"psr/log": "^1.0",
"phpunit/phpunit": "^4.8"
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this should be added for two reasons. The first being that the recommendation is to global install phpunit, and the second being that this change is unrelated to the rest of the PR, so should be proposed seperately.

@neemzy
Copy link
Contributor Author

neemzy commented Jul 28, 2016

@GrahamCampbell That's fine with me, even though I couldn't find anything in the docs about how to test the project. I'm really more interested in the commit that's left now.

@alexandresalome alexandresalome merged commit 9ff6537 into gitonomy:master Jul 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants