Repository navigation
v0.3.2
Patch release. Fixes two latent bugs in the command dispatcher.
-
`mainwp api-keys` was crashing with
`✗ Command 'api-keys' has no entry point.`Root cause: bin/mainwp looked up the entry-point function as
`cmd_api-keys` (with a hyphen), but bash function names cannot
contain hyphens - the function is defined as `cmd_api_keys`
in the file. The help lookup had already done the
${cmd//-/_} translation; the main dispatch had not. -
` --help` was silently broken for 10 of the 16 commands
(api-keys, clients, costs, monitoring, pages, posts, settings,
tags, updates, users). The other six worked. The cause:
`_mainwp_parse_common_flags` normalises `--help` to the
literal string `help` in REMAINING, but those 10 commands only
matched the case pattern `-h | --help` - the raw flag, not
the normalised `help`. Three commands (sites, skill, deps)
already had the correct `-h | --help | help` pattern; the
others did not.
Both bugs were uncovered while testing v0.3.1. The smoke suite
now has a regression test that exercises ` --help` for
every command, so this category of breakage is caught at CI time
from now on.
61 smoke tests, all passing. Upgrade with
`brew update && brew upgrade mainwp`.