Skip to content

Issue with POT file generation on certain JavaScript file #274

@rufus87

Description

@rufus87

Bug Report

Describe the current, buggy behavior

To generate a pot file for a custom plugin, it is recommended to use following command within my plugin folder.

wp i18n make-pot . myplugin.pot

As soon as plugin contains any minified JS file, the command fails with following message: Uncaught Error in exception handling during call to Error::__tostring() in phar:///bin/wp-cli.phar/vendor/mck89/peast/lib/Peast/Syntax/Scanner.php on line 0

Describe how other contributors can replicate this bug

  • run wp i18n make-pot . myplugin.pot CLI command in any folder which contains any minified JS file.

Let us know what environment you are running this on

OS:     Linux 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64
Shell:  /usr/sbin/nologin
PHP binary:     /usr/local/bin/php
PHP version:    7.4.20
php.ini used:
MySQL binary:
MySQL version:
SQL modes:
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /var/www/html/wp-content/plugins/test-plugin
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.5.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions