Skip to content
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

Doesn't work in windows. #71

Closed
bmitch opened this issue Aug 27, 2017 · 9 comments · Fixed by #241
Closed

Doesn't work in windows. #71

bmitch opened this issue Aug 27, 2017 · 9 comments · Fixed by #241

Comments

@bmitch
Copy link
Owner

bmitch commented Aug 27, 2017

Because of this line:

https://github.com/bmitch/churn-php/blob/master/src/Factories/ProcessFactory.php#L35

Is there another command that will do the same thing that works in Windows and Unix?

@josephzidell
Copy link

Can you perform those operations in PHP?

@bmitch
Copy link
Owner Author

bmitch commented Aug 27, 2017

Quite possibly. Is definitely worth looking into. I'll probably have some time in the coming week to look. But if you are feeling up for it please feel free.

@bmitch
Copy link
Owner Author

bmitch commented Sep 11, 2017

I haven't had time to check into this. If anyone else feels like taking a stab at this please feel free.

@villfa
Copy link
Collaborator

villfa commented Oct 9, 2017

It's worth mentioning that the problem in the line comes from the command uniq which doesn't exists in Windows.

But there is another problem which is not related to Windows:

foreach ($this->runningProcesses as $file => $process) {
if ($process->isSuccessful()) {

The script runs forever if a process is terminated but not successful.

@bmitch
Copy link
Owner Author

bmitch commented Oct 10, 2017

Thanks @villfa , are you able to provide an example that makes the script run forever?

@villfa
Copy link
Collaborator

villfa commented Oct 10, 2017

You can enter an infinite loop by running churn on a folder containing a space character.

./vendor/bin/churn run my\ project

The command line returns an error because it is built without using escapeshellarg.

@josephzidell
Copy link

To brush the dust off of this and provide value for Windows users, would you be willing to accept a PR that refactors https://github.com/bmitch/churn-php/blob/master/src/Factories/ProcessFactory.php#L34-L36 to a pure PHP implementation?

@bmitch
Copy link
Owner Author

bmitch commented Dec 22, 2018

@josephzidell yes that would be great!

@tomasfejfar
Copy link

Regarding the escapeshellarg - you can supply parameters one-by-one as array with Symfony process.

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

Successfully merging a pull request may close this issue.

4 participants