Giter Site home page Giter Site logo

Comments (12)

bahmutov avatar bahmutov commented on September 16, 2024

I will look forward to a pull request, don't have access to a windows machine for testing this :(

from pre-git.

bahmutov avatar bahmutov commented on September 16, 2024

Probably need async spawn https://github.com/IndigoUnited/node-cross-spawn-async

from pre-git.

bahmutov avatar bahmutov commented on September 16, 2024

try v3.4.1 if it solves the problem. Windows is just not worth the troubles

from pre-git.

bahmutov avatar bahmutov commented on September 16, 2024

Can you try 3.5.2 - this has a fix for Windows were are trying to test out

from pre-git.

a-ursino avatar a-ursino commented on September 16, 2024

When i run it (the latest version) with node 5.7.0 it gives me
E:\P\hooks-bot\node_modules\.bin\pre-commit:4 caseuname` in
^^^^

SyntaxError: Unexpected token case
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:141:18)
at node.js:933:3
`

with this package.json

"scripts": {
    ...
    "lint": "eslint source test",
    ...
  },
  "pre-commit": [
    "lint"
  ],
  "devDependencies": {
    ...
    "pre-git": "^3.5.4",
    ...
  },

from pre-git.

bahmutov avatar bahmutov commented on September 16, 2024

Could you try pre-git v 3.7.0 please?

from pre-git.

a-ursino avatar a-ursino commented on September 16, 2024

Same env like before and when i do the commit

`

git commit -m "ADDED pre-git"
running pre-commit script
executing task "lint"
"lint" non � riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.

pre-commit You've failed to pass all the hooks.
pre-commit
pre-commit An Error was thrown from command
lint
Error: lint closed with code 1
pre-commit
pre-commit at ChildProcess.onTaskFinished (E:\P\hooks-bot-directio\node_modules\pre-git\src\pre-git.js:170:19)
pre-commit at emitTwo (events.js:105:20)
pre-commit at ChildProcess.emit (events.js:185:7)
pre-commit at maybeClose (internal/child_process.js:827:16)
pre-commit at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
pre-commit
pre-commit You can skip the git hook by running with -n (--no-verify)
pre-commit
pre-commit But this is not advised as your tests are obviously failing.
`

but when i do

`>npm run lint

[email protected] lint E:\P\hooks-bot-directio
eslint source test

`

The same thing happens with other comands

from pre-git.

bahmutov avatar bahmutov commented on September 16, 2024

Hmm, with v3.7.0 and the shell path is set correctly? https://github.com/bahmutov/pre-git#windows

from pre-git.

a-ursino avatar a-ursino commented on September 16, 2024

Yep. Do you need more info?

from pre-git.

bahmutov avatar bahmutov commented on September 16, 2024

Hmm, if @ybiquitous does not know, then it is up to you, @killanaca to debug and solve this.

from pre-git.

ybiquitous avatar ybiquitous commented on September 16, 2024

@killanaca

If you change "lint" to "npm run lint" in "pre-commit" as following, does it work well?

package.json:
{
  ...
  "config": {
    "pre-git": {
      "pre-commit": [
-        "lint"
+        "npm run lint"
      ]
    }
  },
  ...
}

from pre-git.

a-ursino avatar a-ursino commented on September 16, 2024

yes, now it works ;-)

from pre-git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.