Skip to content

Conversation

@iPaat
Copy link

@iPaat iPaat commented Jul 25, 2017

This will:

  • extend .gitignore for JetBrain users
  • fix tests for windows
  • use native PHP functions instead of passthru
  • fix src/Commands/AddCommand.php to use findstr on windows instead of grep
  • add SHEBANG to hook files on windows
  • test that the SHEBANG has been added on windows
  • fix Hooks on Windows environment #7

$gitDir = 'test-git-dir';
passthru("mkdir -p {$gitDir}/hooks");

$command = "mkdir -p {$gitDir}/hooks";
Copy link
Owner

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.

@BrainMaestro
Copy link
Owner

Hey thanks for doing this! It looks pretty good.

@iPaat
Copy link
Author

iPaat commented Jul 25, 2017

Thank you for your feedback.

I have adjusted everything so far that only native PHP functions will be used in future.

@BrainMaestro
Copy link
Owner

Hey that's way better than I thought. Thanks for this

@BrainMaestro BrainMaestro merged commit 3eb176a into BrainMaestro:master Jul 25, 2017
@iPaat iPaat deleted the Enhancement/PrepareForWindows branch July 26, 2017 08:37
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.');
Copy link
Contributor

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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hooks on Windows environment

3 participants