Comments (12)
I will look forward to a pull request, don't have access to a windows machine for testing this :(
from pre-git.
Probably need async spawn https://github.com/IndigoUnited/node-cross-spawn-async
from pre-git.
try v3.4.1 if it solves the problem. Windows is just not worth the troubles
from pre-git.
Can you try 3.5.2 - this has a fix for Windows were are trying to test out
from pre-git.
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 case
uname` 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.
Could you try pre-git v 3.7.0 please?
from pre-git.
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.
Hmm, with v3.7.0 and the shell path is set correctly? https://github.com/bahmutov/pre-git#windows
from pre-git.
Yep. Do you need more info?
from pre-git.
Hmm, if @ybiquitous does not know, then it is up to you, @killanaca to debug and solve this.
from pre-git.
@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.
yes, now it works ;-)
from pre-git.
Related Issues (20)
- Cannot use pre-git when node_modules is not in the same folder as .git folder HOT 4
- rm -rf node modules?? HOT 1
- Does not find the package if a subfolder from git root HOT 1
- Find the right package.json with pre-git config
- Disable pre-commit hook for specific commit message
- added task to pre-commit and after success won't fire git commit. HOT 2
- upgrade simple-commit-message to 3.x.x HOT 1
- Setup next-update-travis
- post-checkout with no config present HOT 2
- Living on it's own! HOT 4
- why on discard some file pre-git execute post-checkout?
- Package validate-commit-msg is Deprecated HOT 1
- Set up renovate app
- Dependency deprecation warning: validate-commit-msg (npm)
- Dependency deprecation warning: travis-deploy-once (npm)
- Running grunt build tasks on pre-push hook HOT 1
- Can't remove dependency without breaking git
- Action Required: Fix Renovate Configuration
- Is this project still maintained? HOT 5
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pre-git.