-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add a --system argument for system-wide installation #149
Conversation
I also just went ahead and added a fix and a test for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! That's a useful feature.
Thanks also for the other fixes / cleanup and for adding a test.
Just a minor nit, otherwise I think this is good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think this is good to go now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, spoke too soon, this is not passing tests:
- looks like the
text
parameter tocheck_output
is 3.7+ only. Can you useuniversal_newlines
instead? - we're getting lots of stray output:
fatal: --local can only be used inside a git repository
…mmand results are returned as strings and not bytes
@kynan Changed the text parameter as requested. The stray output was due to the I also fixed the Git test since it didn't run properly on my system even though it looks fine on Travis. Apparently the version of Git on macOS seems to insist on having a newline at the end of the attributes file (it threw an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, excellent work, really appreciate your contribution :)
This PR adds a
--system
argument for system-wide installation.Since there doesn't seem to be a simple way to figure out the
$(prefix)
variable of the Git installation, I had to resort to a kind of hacky way to figure that one out in order to put the system-widegitattributes
file in the correct place (see the_get_system_gitconfig_folder()
function).I also fixed the path of the gitattributes file in the documentation when using the
--global
argument, which was incorrectly documented as being.git/info/attributes
instead of~/.config/git/attributes
.I also took the liberty of adding a few newlines to improve readability.