Reported on StackOverflow.
composer install on Windows fails on the xhprof scripts:
c:\xampp\htdocs\Projects\piwik > php C:\ProgramData\ComposerSetup\bin\composer.phar install 'misc' is not recognized as an internal or external command, operable program or batch file. Script misc/composer/clean-xhprof.sh handling the pre-install-cmd event returned with an error [RuntimeException] Error Output: 'misc' is not recognized as an internal or external command, operable program or batch file.
I was able to reproduce it on a Windows 7 box.
I fixed it by calling a PHP class from
composer.json instead of a bash script. The PHP class still calls the bash scripts though.
I have blatantly copied Symfony's solution: https://github.com/symfony/symfony-standard/blob/master/composer.json#L25-L45
@mnapoli - I just tried this on my Windows 10 machine but this did not work. So, I had to use the
--no-script solution to get this working. Is this intended?
It's not intended to be but I think it kind of "makes sense". I'll create an issue to add this to the documentation
Thx for that!