Skip to content

Error - option is required, but it isn't? #14

Description

@tdmalone

When running the search_replace command, passing through two parameters - the old string to be replaced by the new string - I get this error:

.....\node_modules\wp-cli\lib\WP.js:90
throw "Error option <"+key+"> is required for "+use.join(" ")+". See http://wp-cli.org/commands/"+use.join('/');
^
Error option <export> is required for search-replace. See http://wp-cli.org/commands/search-replace

http://wp-cli.org/commands/search-replace shows that the only required arguments are the first two, and --export is indeed an optional argument.

Looking at the output of wp cli cmd-dump, the search-replace command appears to be explained like this:

"synopsis": "<old> <new> [<table>...] [--dry-run] [--network] [--all-tables-with-prefix] [--all-tables] [--export[=<file>]] [--export_insert_size=<rows>] [--skip-columns=<columns>] [--include-columns=<columns>] [--precise] [--recurse-objects] [--verbose] [--regex]"

I'm not certain, but could it be that because the option to include a file with the --export option is also optional, node-wp-cli is getting a bit confused about the status of this option?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions