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

Add git-extras #165

Open
gabrielalmeida opened this issue Jul 20, 2014 · 3 comments
Open

Add git-extras #165

gabrielalmeida opened this issue Jul 20, 2014 · 3 comments

Comments

@gabrielalmeida
Copy link

https://github.com/visionmedia/git-extras
Nice utility for those who manage git repos at Nitrous boxes..

@jeffjewiss
Copy link
Contributor

I tried creating a package for TJ's git extras, however, due to this line I don't think it's possible without sudo access since the action user can't create files in /etc.

@gmckeever am I missing something, is there a way to create a file in /etc via an autoparts package installation step?

The alternative would be to fork the repo and tag a new release that doesn't have bash completion, but that seems like a hack.

@gmckeever
Copy link
Contributor

There isn't any way to write to /etc or outside of the home folder, but there could be a workaround for this.

One workaround I am thinking of is to use the inreplace method seen in the git-extras Homebrew package:

https://github.com/Homebrew/homebrew/blob/800842eec1d9633ee95c5e003e5a8813eeae0739/Library/Formula/git-extras.rb

You would need to drop in the entire method to the Autopart package if you wanted to utilize this:

https://github.com/Homebrew/homebrew/blob/800842eec1d9633ee95c5e003e5a8813eeae0739/Library/Homebrew/utils/inreplace.rb

@jeffjewiss
Copy link
Contributor

If I'm understanding this correctly, inreplace would alter the Makefile so that the bash completion files are placed inside the prefix_path instead of in /etc/bash_completion.d/.

I gave this a shot, but it looks like Pathname.atomic_write is custom to Homebrew.

Thoughts?

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

No branches or pull requests

3 participants