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

[bug] not working if zsh output something else first. #58

Closed
towry opened this issue Aug 10, 2023 · 1 comment
Closed

[bug] not working if zsh output something else first. #58

towry opened this issue Aug 10, 2023 · 1 comment

Comments

@towry
Copy link
Contributor

towry commented Aug 10, 2023

I added following debug code to git-conflict.lua:

  get_git_root(fn.fnamemodify(api.nvim_buf_get_name(buf), ':h'), function(git_root)
    get_conflicted_files(git_root, function(files, repo)
      vim.print(files)
      for name, b in pairs(visited_buffers) do

And the output of a not working git repo output this:

{                                                                                                                                                                                            
  ["Using Node for alias legacy"] = {}                                                                                                                                                       
}    

This output is because I am using fnm and the repo directory contains a .nvmrc file which make fnm automatically choose node version base on it's content.

I successfully managed to repro this issue in a demo repo with follow steps:

  1. cd /tmp && mkdir conflict && cd ./conflict
  2. try to create a simple conflict file like conflicted-file.txt inside the conflict folder, I will pass those steps.
  3. create a .nvmrc file with content legacy.
  4. Install fnm.
  5. fnm alias v16.0.0 legacy, note: the node version doesn't matter.
  6. every time you cd into this directory, a message will show: Using Node for alias legacy.
  7. nvim conflicted-file.txt.

  • NVIM v0.10.0-dev-779+gfdb11888f
  • git-conflict.nvim: v1.1.2
towry added a commit to pze/git-conflict.nvim that referenced this issue Aug 10, 2023
akinsho pushed a commit that referenced this issue Aug 14, 2023
So we avoid spawning a shell

Co-authored-by: towry <towry@users.noreply.github.com>
@akinsho
Copy link
Owner

akinsho commented Aug 14, 2023

fixed by #59

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

2 participants