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 support for GUIs #40

Closed
kentcdodds opened this issue Jan 6, 2016 · 20 comments
Closed

Add support for GUIs #40

kentcdodds opened this issue Jan 6, 2016 · 20 comments

Comments

@kentcdodds
Copy link
Contributor

I think that we could potentially fix the issues with GUIs by making the githooks use the system's default shell scripting language (not sure what it is for Windows). Then it would set the PATH and call into the node stuff. Thoughts?

@gtramontina
Copy link
Collaborator

Do you mean something like this #18 (comment)?

@kentcdodds
Copy link
Contributor Author

Yeah, I think so

@gtramontina
Copy link
Collaborator

The advantage of using node as the script language is that by having node installed, we shouldn't care which OS it is running on…

AFAIK Windows' command prompt does not interpret shebangs... A quick search gave me this: http://whitescreen.nicolaas.net/programming/windows-shebangs

@kentcdodds
Copy link
Contributor Author

Right. I think I have a fundamental misunderstanding of the problem and a good solution. All I know is several of my coworkers use GUIs and I want them to be able to continue to do so without having to do any extra work.

@gtramontina
Copy link
Collaborator

I see. So maybe we could go with something like #18 (comment) first and then figure Windows out, but this could potentially break existing windows users. I'll ask on gitter to see we there are any windows users who would help out. Meanwhile, a virtual box is being installed... 😛

@BarryThePenguin
Copy link

FWIW ghooks works fine on my machine with SourceTree. I know there's a lot of other scenarios (especially on windows), happy to be a guinea pig!

@gtramontina
Copy link
Collaborator

@BarryThePenguin thanks for chiming in! 🍻
Do you happen to use window's default prompt for command line usage?

@BarryThePenguin
Copy link

Not regularly. I use MinGW (Git for Windows), which I also used to install *nix tools to my PATH

@BarryThePenguin
Copy link

Another update. SourceTree v1.8.2.0 on windows now no longer works. Same problem as in OSX now...

@kentcdodds
Copy link
Contributor Author

So I just saw this which apparently can find the node binary!!! We could open source that script and use it here :D

@gtramontina
Copy link
Collaborator

Nice! I saw that @sindresorhus already has that in the works…

I guess that the shebang would also have to become a variable in the raw template, then…

randycoulman added a commit to CodingZeal/react-boilerplate that referenced this issue Jul 15, 2016
The `ghooks` package doesn't work well with GUI git tools.  They're
aware of that and working on the issue (see
ghooks-org/ghooks#40), but for now I'm
removing them from this PR.

I'll watch that issue and re-consider once they've resolved it.

Even if you opt out of the hooks, they still have to run just enough to
know to opt out.
@sindresorhus
Copy link

Here you go: https://github.com/sindresorhus/run-node

@njpanderson
Copy link

Hi all - are you any closer to resolution on this issue, out of interest?

@kentcdodds
Copy link
Contributor Author

I haven't worked on it any further, but I think with @sindresorhus's new module you could probably make it work if you wanted to makeapullrequest.com :)

@mmmpie
Copy link

mmmpie commented Sep 8, 2016

In our git hook scripts we have to source an environment to get them to run in gui clients. Its a bit convoluted, given all the possibilities for environment setup.

@kentcdodds
Copy link
Contributor Author

Could you try switching to husky and letting us know how that goes? I proposed we deprecate ghooks in favor of husky #166

@thecotne
Copy link
Contributor

@kentcdodds husky also have problems with GUIs typicode/husky#87

@ghost
Copy link

ghost commented Jun 19, 2017

@kentcdodds is this a bug or an enhancement request?

@ghost ghost added the followup requested label Jun 19, 2017
@kentcdodds
Copy link
Contributor Author

I guess it's an enhancement because it never worked in GUIs...

@ghost ghost changed the title Fix issues with GUIs Add support for GUIs Jun 26, 2017
@ghost ghost added enhancement and removed followup requested labels Jun 26, 2017
@ghost
Copy link

ghost commented Jul 11, 2017

Potentially related: observing/pre-commit#56

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

No branches or pull requests

7 participants