Closed miguelantoniosantos closed 6 years ago
What happened with the windows when you run that original script? I think you can do the similar test with where on Windows, but I don't have a windows to test it with.
This should do the trick:
$whichcommand = (PHP_OS == 'WINNT') ? 'where' : 'which';
I looked it up, and it looks like the which command is not present on Windows (replaced instead with where ).
Disabling a feature makes little sense if it can be made to work with minimal effort.
if (`which xmllint` || `where xmllint`)
I am not sure if this would even work. I only have access to windows machines on week days.
I can run it on GNU/Linux if you test it first on Window and make sure it works there.
Didn't knew about the where
command. I will test it out.
Both suggestions work but, in my opinion, its better only to execute one command than to test two of them.
OR test || only executes the left and if it fails, then it the right one, not both by default. The first test should be which as it sounds to me a bit pervert to run PHP on Windows :D
True, but we exist. xD
Sorry for the delays, college systems were a mess today. Will test it out tomorrow.
I feel like writing a CONTRIBUTING guide now.
This repository follows the issue-discussion-PR pattern.
May as well do an exception again. AFAIK, the which command does exist on Windows. What is the point of this? What bug(s) does it solve?
EDIT: I was wrong. Windows has a where command instead of which.