-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
I created a custom package containing a command named "bzmn." When I am in the directory containing the source, and I run wp scaffold package-readme ., the output in README.md is substantially truncated. For an example, please refer to README - without bzmn custom command installed.md. Command descriptions, options, and examples are all absent.
If I install the bzmn custom command via wp package install ., then run wp scaffold package-readme ., the output is complete. For an example, please refer to README - with bzmn custom command installed.md.
If you diff the files, the issue is glaring.
It seems to be the case that the README information is only correct (comprehensive, as in the second example) if the custom package is installed on the system. If it isn't installed, you get the incomplete "style" of README, as in the first example. Is that behaviour intentional? If so, is that desirable? My expectation is that the wp scaffold package-readme . command only sees and operates on the files in the current directory. If the developer's custom package needs to be installed for the package-readme subcommand to work, it may be helpful to note that in the documentation.
Since a developer running the command to generate the README probably already has the package installed, this issue may have been overlooked. I only encountered the issue when creating a Docker container to automatically generate the README. The container, of course, didn't have my custom package pre-installed, and it took a bit of time to figure out why the command output wasn't the same as on my local computer, when the commands themselves were identical.
Let us know what environment you are running this on
The output of wp --info:
OS: Darwin 24.6.0 Darwin Kernel Version 24.6.0: Wed Nov 5 21:33:59 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_ARM64_T8112 x86_64
Shell: /bin/zsh
PHP binary: /usr/local/Cellar/[email protected]/8.3.23/bin/php
PHP version: 8.3.23
php.ini used: /usr/local/etc/php/8.3/php.ini
MySQL binary: /Users/Shared/DBngin/mysql/8.0.27/bin/mysql
MySQL version: mysql Ver 8.0.27 for macos11 on x86_64 (MySQL Community Server - GPL)
SQL modes: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
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: phar:///usr/local/bin/wp
WP-CLI packages dir: /Users/saul/.wp-cli/packages/
WP-CLI cache dir: /Users/saul/.wp-cli/cache
WP-CLI global config: /Users/saul/.wp-cli/config.yml
WP-CLI project config:
WP-CLI version: 2.12.0