usmanyunusov / nano-staged

Tiny tool to run commands for modified, staged, and committed files in a GIT repository.
https://npm.im/nano-staged
MIT License
416 stars 12 forks source link

GIT_TRACE breaks nano-staged paths #41

Open jyannessa-mtx opened 3 months ago

jyannessa-mtx commented 3 months ago

Describe the bug

Using GIT_TRACE breaks nano-staged path resolution here https://github.com/usmanyunusov/nano-staged/blob/master/lib/git.js#L121

Reproduction

  1. Modify and stage a file
  2. Run `GIT_TRACE=1 git commit -m "test commit"

System Info

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Max
    Memory: 97.03 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - ~/.volta/tools/image/node/20.11.0/bin/node
    npm: 10.2.4 - ~/.volta/tools/image/npm/10.2.4/bin/npm
  Browsers:
    Chrome: 125.0.6422.176
    Safari: 17.5

Used Package Manager

npm