Comments (4)
I haven't used Git Bash on windows yet. Will try to install it in the weekend.
Is it possible that the C folder symlinks to C: ?
Do you get the same results when you run following commands:
$ cd /C:
$ mkdir test
$ cd test
$ git init
$ grumphp git:init
from grumphp.
Unfortunately that does not work, because Git Bash maps each Windows drive Letter /letter. So for example C:\test becomes /c/Test.
lasleh@CPB2265 /c/test (master)
$ php -r "var_dump(getcwd());"
string(7) "c:\test"
And both of these work:
cd /c/test
cd c:\test
So I assume there is something funny going on when you try to determine the absolute path when a relative one is given.
from grumphp.
Hi @lasselehtinen ,
I tested git bash and it seems to work here:
# I started gi bash with: sh.exe --login
$ cd /C
$ mkdir test
$ cd test
$ git init
$ grumphp configure
$ grumphp git:init
The result I retrieve is:
$ cat .git/hooks/pre-commit
#!/bin/sh
# ...
(cd "./" && exec "c:\Users\Verweto-Win\AppData\Roaming\Composer\vendor\bin/grump
hp" "git:pre-commit" "--config=grumphp.yml" '--skip-success-output')
# ....
Does it work when you manuallt create the .git/hooks folder?
But even when I remove this folder and try it again it is working:
$ rm -rf .git/hooks
$ grumphp git:init
Created git hooks folder at: ./.git/hooks/
Watch out! GrumPHP is sniffing your commits!
Maybe you can try upgrading git bash?
from grumphp.
That seemed to be the case. I was using old 1.9.3 version of Git Bash whereas updating to 2.6.3 made the problem go away.
from grumphp.
Related Issues (20)
- Support grumphp.dist.yml HOT 2
- Provide a security policy for this library HOT 4
- Allow to also ignore untracked files HOT 2
- GrumPhp is not able to validate a valid regular expression for branch name validation HOT 1
- Need more information on git_blacklist.keywords ignore on some codes HOT 3
- Validating all lines of file instead of changes made to commit HOT 1
- Auto prepending commit message with JIRA ticket number HOT 4
- With GrumPHP php-cs-fixer is not able to exclude the directories as configured in .php-cs-fixer.php HOT 3
- Custom task not working when parallel option is enabled HOT 5
- Add support for PSR-4/`composer dump-autoload` testing HOT 3
- Consider adding a `composer.lock` file in the repository HOT 14
- phpcs does not detect default ruleset xml file HOT 6
- PHPMD task does not check all file extensions HOT 5
- Don't do commit message checks on merges? HOT 8
- Memory is not being released in parallel execution HOT 2
- Grumphp running without `.git` folder? HOT 4
- Print the commit message when failing on `git_commit_message` HOT 4
- how can I use grum with docker-compose ? HOT 3
- Fails to Recognize PHPStan Baseline During Commit Workflow
- Override open_basedir only for grumphp test HOT 2
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 grumphp.