I am using husky to run lint-staged and everything is going fine until I tried to commit using Atom's git gui. This led me to investigate as to what was causing this issue until I finally found the culprit. For some reason Atom's git module adds GIT_TRACE:true to the process.env which causes the process to crash.
If I change
var cmd = spawn(bits[0], args, {
cwd: module.exports.cwd
});
for
var cmd = spawn(bits[0], args, {
cwd: module.exports.cwd,
env: Object.assign({}, process.env, {GIT_TRACE: false})
});
then everything runs correctly.
Now this might not be a staged-git-files specific problem but I need to investigate more in order to find what the correct behavior should be.
I am using husky to run lint-staged and everything is going fine until I tried to commit using Atom's git gui. This led me to investigate as to what was causing this issue until I finally found the culprit. For some reason Atom's git module adds GIT_TRACE:true to the process.env which causes the process to crash.
If I change
for
then everything runs correctly.
Now this might not be a staged-git-files specific problem but I need to investigate more in order to find what the correct behavior should be.