Skip to content

Conversation

@johnbillion
Copy link
Contributor

This improves the help text and adds clearer error messages relating to the <dir> flag.


if ( ! file_exists( $package_dir . '/composer.json' ) ) {
WP_CLI::error( 'Invalid package directory. composer.json file must be present.' );
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the repetition of code, what do you think about creating self::check_package_dir( $package_dir ), and abstracting these error checks to it?

@danielbachhuber
Copy link
Member

I've enabled the setting for Circle to build forked pull requests too.

@johnbillion
Copy link
Contributor Author

Something's up with Circle CI

@danielbachhuber
Copy link
Member

Something's up with Circle CI

@johnbillion You'll need to push first, and then it will build the next push.

@danielbachhuber danielbachhuber merged commit a8166ed into wp-cli:master Jun 21, 2017
schlessera pushed a commit that referenced this pull request Aug 9, 2022
Clarify help text and error messages for invalid <dir> values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants