ohmyzsh/ohmyzsh

Terminal shows "core dumped" when the directory is a git repo

CherryYang05 opened this issue · 1 comments

Describe the bug

As beginning I used VSCode remote SSH to connect the server, when I open a directory which includes the '.git' dir, it flashed in a short time. Then I put the "zsh" command in my terminal(not in VSCode terminal), it displayed "core dumped". And when I enter a dir without a '.git' dir after I enter a dir including a '.git' dir(e.g. 'cd git_repo' and then 'cd ..'), it also display the omz's git prompt like '~(master)'. Actually, my home dir does not include '.git' dir.
I tried a lot, when I open a directory without '.git' dir, it worked as it was. I guess maybe it is my server's problem, but I copy the '.oh-my-zsh' dir(lower version) from other server, it worked without any errors.
The error above may be caused by some bugs in the latest version.

Steps to reproduce

  1. open a dir including '.git' dir in vscode
  2. OR input 'zsh' command in a dir including '.git' dir in your own terminal

Expected behavior

  1. in vscode, the terminal flashed and quit
  2. in your own terminal, it displayed 'core dumped'

Screenshots and recordings

No response

OS / Linux distribution

CentOS 7

Zsh version

5.0.2

Oh My Zsh version

master(605d766)

Terminal emulator

VSCode terminal & Termius

If using WSL on Windows, which version of WSL

None

Additional context

No response

Hi there! Thanks for the reproduction steps, this reported already in #12331, let's keep the investigation in there.