-
Notifications
You must be signed in to change notification settings - Fork 89
Add support for Windows #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Windows #8
Conversation
For developers who use JetBrains IntellJIDEA.
tests/ListCommandTest.php
Outdated
@@ -37,7 +37,13 @@ public function it_lists_hooks_that_exist() | |||
public function it_uses_a_different_git_path_if_specified() | |||
{ | |||
$gitDir = 'test-git-dir'; | |||
passthru("mkdir -p {$gitDir}/hooks"); | |||
|
|||
$command = "mkdir -p {$gitDir}/hooks"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know what, could we just use the mkdir function? I should've done that in the first place. It would be much better.
Hey thanks for doing this! It looks pretty good. |
Thank you for your feedback. I have adjusted everything so far that only native PHP functions will be used in future. |
Hey that's way better than I thought. Thanks for this |
public function it_adds_shebang_to_hooks_on_windows() | ||
{ | ||
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') | ||
$this->markTestSkipped('This test is only relevant on windows. You\'re running Linux.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I am not. I'm on macOS ;)
This will:
.gitignore
for JetBrain userspassthru
src/Commands/AddCommand.php
to usefindstr
on windows instead ofgrep