Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for non-zero exit status #5

Merged
merged 5 commits into from Jul 13, 2017

Conversation

fjarrett
Copy link
Contributor

@fjarrett fjarrett commented Jul 12, 2017

Implements #4

  • Only exit with status 0 when all tests pass
  • Use the total number of REQUIRED and WARNING errors as the exit status code
  • Remove interactive prompt for Theme Check plugin dependency that blocks automated workflows
  • Add --interactive flag that is true by default but can be negated with --no-interactive
  • Exit with status 1 when the Theme Check plugin dependency is not met

@anhskohbo
Copy link
Owner

Could you update before_themecheck() method with support --no-interaction flag?
I still want ask to run command. In your case just pass --no-interaction flag.

wp themecheck --theme=primer --no-interaction

@fjarrett
Copy link
Contributor Author

@anhskohbo Absolutely.

@fjarrett
Copy link
Contributor Author

@anhskohbo Typically interactive modes are something you opt-in to rather than opt-out of, but I've done what you've asked in ae98753.

I also extended this concept into the theme selection process by defaulting to the current active theme if no --theme option is specified while using the --no-interactive flag.

@anhskohbo anhskohbo merged commit 8a33d4c into anhskohbo:master Jul 13, 2017
@anhskohbo
Copy link
Owner

Nice work! Thanks for this pull-request!

@@ -178,7 +188,7 @@ private function choices_theme() {
$themes[ $id ] = $theme->get( 'Name' );
}

return cli\menu( $themes, wp_get_theme()->template, 'Choose a theme' );
return cli\menu( $themes, get_stylesheet(), 'Choose a theme' );
Copy link
Contributor Author

@fjarrett fjarrett Jul 13, 2017

Choose a reason for hiding this comment

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

@anhskohbo Not sure if you knew this, but the default name was set to template which meant if the current theme was a child theme the name of its parent theme would be displayed. This did not seem right to me so I changed it to use the stylesheet.

@fjarrett fjarrett deleted the non-zero-exit-on-error branch July 13, 2017 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants