Skip to content

GIT_TRACE: true cause process to crash #18

@maloguertin

Description

@maloguertin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions