Is it possible to check for the current operating system? The following cmd fails on windows, because chmod does not exist
{ ...
"scripts": {
"post-update-cmd": "chmod -R 777 ../log"
}
}
Is there a workaround to solve this ? Kind regards, Robert
Simplest solution is using PHP itself I reckon:
{ ...
"scripts": {
"post-update-cmd": "php -r chmod('../log', 0777);"
}
}
This requires the php binary to be in your PATH (or similar) on Linux/OSX/Windows.
Ps: I can't recall for sure, but I believe path should be relative to where your composer.json is, so you may have to adjust the above path accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With