Open GeekZebre opened 5 years ago
@GeekZebre Did you call bin/prepare
or bin/update
before?
@GeekZebre Do you use Linux? Which PHP/node version?
@mimmi20 Yes, I called bin/prepare.
I'm on Windows 10 with PHP 7.2 and node 8.11.1
$ php -version
PHP 7.2.8 (cli) (built: Jul 18 2018 10:03:03) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Xdebug v2.6.1, Copyright (c) 2002-2018, by Derick Rethans
$ node -v
v8.11.1
Did that work? On my system, Windows doesn't handle .sh files.
I use Git Bash to launch ! (MINGW64)
I cannot reproduce this. I dont have installed php, node and the other required tool on my local machine, only in the vm.
"The vm" ? I don't see anything about a vm in the documentation. This is your personnal vm ?
What does the behaviour of this line ? https://github.com/diablomedia/useragent-parser-comparison/blob/5c4c7b0c4be2b75a5af80eea62ce652bf48f8b6c/src/Command/Test.php#L126
A new window is open ?
In my case, a new windows is open. In the new window, the json is output. But it's seem that the content is not transmit to the original windows.
What is your behaviour ?
"The vm" ? I don't see anything about a vm in the documentation. This is your personnal vm ?
yes, my personell VM.
And the behaviour must be ?
What does the behaviour of this line ?
Each parser has a file parse.sh
. This is a shell script which initializes and starts the parsing of the test useragents.
$testData['path']
is the parser directory.
$testOutput
contains the parsing result, which is a huge json.
It's seem that $testOutput
is empty for me.
@mimmi20 I found a solution :
By example, replace
shell_exec( $testData['path'] . '/build.sh'));
by
shell_exec( 'sh '. $testData['path'] . '/build.sh'));
On windows, when we are passing 'shell_exec' a filepath, this is not interpreted as "execute the file at this path". https://stackoverflow.com/questions/7397672/how-to-run-a-sh-file-from-php
On windows, we must add the command 'sh' before the filepath oh the sh file.
There are 2 'shell_exec' in the code + 1 in your pull request.
When I launch
./bin/console compare
, I have:A new console window is open when the 'build.sh' is called. Is it te good behaviour ?
Thanks.