Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-4979

Git hooks fail on Sourcetree only

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Highest Highest
    • 1.8.2.3
    • 1.8.2.2
    • Git
    • None
    • Windows 10 x64
      SourceTree 1.8.2.2
      System Git 2.7.2.windows.1
      Node v4.3.1
      Gulp v3.9.1

      I have setup a pre-commit and pre-push hook that runs `npm test`, which in turns executes `gulp test` on my project.
      By running the hook manually in the git bash (`.git/hooks/pre-push`) the test passes, also by running git push or git commit.

      When committing and pushing with SourceTree, since updating to 1.8.2.2, I get the following error message:

      running lint...failed!
      ./node_modules/.bin/gulp: line 12: node: command not found
      

      That line has:

      node  "$basedir/../gulp/bin/gulp.js" "$@"
      

      The hooks have been setup automatically with the npm library https://www.npmjs.com/package/precommit-hook.

              Unassigned Unassigned
              222717cf7a23 Piergiorgio Quinto
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: