yadm-dev / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
5.15k stars 177 forks source link

Incorrect GIT_WORK_DIR with fish #345

Open jonathf opened 3 years ago

jonathf commented 3 years ago

Describe the bug

yadm lists all my tracked files as deleted when running yadm status in any folder except $HOME.

To reproduce

Can this be reproduced with the yadm/testbed docker image: No

testbed doesn't allow easy install of fish.

Steps to reproduce the behavior:

  1. Install fish and yadm
  2. yadm clone any/repo
  3. fish
  4. cd ~/.config
  5. yadm status

Expected behavior

yadm status should list current status of your dotfiles. Instead it lists all dotfiles as deleted, as if the GIT_WORK_TREE=. is current directory instead of $HOME. In other words, if you are in your $HOME folder, things works as expected.

Environment

tmewett commented 3 years ago

To help bug-hunting: I cannot reproduce this with

jonathf commented 3 years ago

I have a laptop with similar specs with Ubuntu. Also no issue.

Note that expliclitly setting $GIT_WORK_TREE also works. So for the time being, as a workaround, I have the following alias in my config.fish:

alias yadm="env GIT_WORK_TREE=$HOME yadm"
github-actions[bot] commented 2 years ago

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 years ago

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.