- π³π±Netherlands tess bakker
The happy path works as expected, but if the directory creation fails, follow-up errors will occur.
Throwing an exception could help users more with the actual issue.
if (!file_exists($destination) && !mkdir($destination, 0755, TRUE) && !is_dir($destination)) { throw new \RuntimeException(sprintf('Directory "%s" was not created', $destination)); }
Test call:
drush potx --destination=/tm/p --folder=/var/www/html/web/core/modules/action