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

Git hooks that call external programs do not work in Flatpak #94

Closed
aminya opened this issue Feb 20, 2023 · 7 comments
Closed

Git hooks that call external programs do not work in Flatpak #94

aminya opened this issue Feb 20, 2023 · 7 comments

Comments

@aminya
Copy link
Contributor

aminya commented Feb 20, 2023

The problem

I am not sure where I should open this issue, but in case Flatpak is supported here:

When using the Flatpak version of GitHub Desktop, the Git hooks that call the external programs (e.g. Node, npm, yarn, etc.), will not work. The program cannot call them.

Release version

3.1.5-linux2

Operating system

Kubuntu 22.10

Steps to reproduce the behavior

  1. Create a git hook (e.g. using Husky)
  2. Call an external program inside the hook

Log files

No response

Screenshots

No response

Additional context

shiftkey/desktop#828

@Lunarequest
Copy link
Collaborator

I believe this should be expected(git hooks link to /usr/ which doesn't exist in the flatpak), could you try running it from CLI and see if git outputs anything?

@aminya
Copy link
Contributor Author

aminya commented Feb 21, 2023

Yes, the git hooks work as expected with the git CLI, but I'd like to use GitHub Desktop for committing. This now blocks the commit feature.

@Lunarequest
Copy link
Collaborator

from the cli I mean running flatpak from the cli like

$ flatpak run io.github.shiftey.Desktop/

Along with this try

$ flatpak run --devel --command=sh io.github.shiftey.Desktop 

this will give you a sh shell inside the sandbox. You might be able to get more debugable info. I doubt it would be possible to support git hooks probably ever due to the way the sandbox works.

@Lunarequest
Copy link
Collaborator

After looking into this, git hooks are spawned inside the sandbox and as a result don't work there is no work around as this would require major changes to now git handles hooks

@StuartJAtkinson
Copy link

I have found this issue. Is it non-fixable? It finds the external editor fine.

@Lunarequest
Copy link
Collaborator

it is non fixable without a massive rewrite inside git to make it possible to spawn git hooks outside the flatpak container

@Lunarequest Lunarequest closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2023
@Lunarequest Lunarequest pinned this issue Dec 2, 2023
@aminya
Copy link
Contributor Author

aminya commented Dec 2, 2023

@Lunarequest If you are deciding to close the issue as not planned, please consider adding this downside to the Flatpak readme or description.

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