git-learning-game / oh-my-git

An interactive Git learning game!
https://ohmygit.org
Other
2.06k stars 146 forks source link

git commit starts terminal vim process and then hangs #100

Open baldo opened 3 years ago

baldo commented 3 years ago

In the level "Your first git commit" doing

git add glass
git commit

spawns my terminal vim but no terminal to actually edit the commit message. In that state I can edit glass but not perform any git commands (input field won't let me type). Therefore I cannot progress through the level.

Running on NixOS (using this PR). $EDITOR and $GIT_EDITOR are set to vim. Also /etc/gitconfig includes:

 [core]
    editor = vim
blinry commented 3 years ago

Woops! Inside of the game environment, we use our own gitconfig (the file scripts/gitconfig in this repo), which sets the editor to a special fake-editor script. Can you check what git config core.editor outputs when you run it inside the game?

baldo commented 3 years ago

In the game this gives me: ~/fakeeditor

baldo commented 3 years ago

If I set the fake-editor manually via commandline it works btw:

export GIT_EDITOR="'$HOME/.local/share/Oh My Git/tmp/fake-editor'"
oh-my-git

In that case git config core.editor inside the game also gives me ~/fakeeditor