Allow output folder/filename to be specified

Created on 3 December 2018, about 6 years ago
Updated 10 July 2024, 6 months ago

Problem

We're trying to run POTX for many separate projects. Ideally we'd run POTX in a similar fashion as was possible in 7.x-1.x (using a simple php cli invocation) however this seems no longer feasible with the requirements for Drupal 8. It would be very useful if POTX doesn't need to be installed in the project that is being analysed.

This is almost possible using something like this drush -r /potx/site/install potx single --api 8 --folder /project/to/extract/from however this will still put the file in /potx/site/install which makes automation a bit more difficult.

Solution

Introduce an --outfile flag for the single mode or an --out flag for the multiple file mode that specifies a file and directory respectively to be able to control where output is created.

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands kingdutch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±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

  • πŸ‡ΊπŸ‡¦Ukraine cmd87

    Adding a patch that compatible with version 8.x-1.1

Production build 0.71.5 2024