You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change
if (php_sapi_name() === 'cli' && PHP_OS != 'WINNT') {
to
if (php_sapi_name() === 'cli') {
Otherwise, the command line arguments are completely ignored on Windows.
At some points, you may want to check the OS, and not try some actions it is not capable of. However, at the very beginning of the script, I don't see the rationale. I have changed this on my local copy and it is working just fine, including the color support.
The color support might be working because of extensions I have installed. But even so, should not be merged with command line checking.
I tested only with 'file' and 'url' command line arguments.
The text was updated successfully, but these errors were encountered:
I just run it from a standard cmd.exe window. However, I installed ansicon (http://adoxa.altervista.org/ansicon/) on my path, which I think may be providing the color support. In any case, there are also various bash shells that run on Windows, such as the one that comes with git. the OS will still be winnt. So the checks may need to be more fine grained.
I didn't try anything about blacklist. If there is something quick to try, I can try.
The main thing, is to make sure the command line arguments are processed, even when running on windows.
Change
if (php_sapi_name() === 'cli' && PHP_OS != 'WINNT') {
to
if (php_sapi_name() === 'cli') {
Otherwise, the command line arguments are completely ignored on Windows.
At some points, you may want to check the OS, and not try some actions it is not capable of. However, at the very beginning of the script, I don't see the rationale. I have changed this on my local copy and it is working just fine, including the color support.
The color support might be working because of extensions I have installed. But even so, should not be merged with command line checking.
I tested only with 'file' and 'url' command line arguments.
The text was updated successfully, but these errors were encountered: