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

Conditionally run checks on multisite #106

Open
ehoanshelt opened this issue Apr 4, 2017 · 3 comments
Open

Conditionally run checks on multisite #106

ehoanshelt opened this issue Apr 4, 2017 · 3 comments

Comments

@ehoanshelt
Copy link
Contributor

I have not been successful with this yet but I'm looking for a way to do conditional logic to run certain checks.

A good example (psudocode):
If define "multisite" exists
Do additional checks
If not
Skip additional checks

Is there a creative way to accomplish this within the doctor cli system

@danielbachhuber
Copy link
Member

At this point, I think I'd have to separate files:

wp doctor check --config=single.yml
wp doctor check --config=multisite.yml

Each could inherit a base.yml that defines common checks, and then have custom checks as needed.

The doctor.yml format is documented here: https://danielbachhuber.com/tip/customize-doctor-config/

@ehoanshelt
Copy link
Contributor Author

That's what I'm planning on doing. :-)

I was hoping to develop a one liner for my team and make doctor do all the "figuring out" but maybe this can be a feature request? In the meantime, the solution above is what I'll implement.

Thanks for the fast response back!

@danielbachhuber
Copy link
Member

I was hoping to develop a one liner for my team and make doctor do all the "figuring out" but maybe this can be a feature request?

Sure. I don't have any great alternatives off the top of my head, but we can let it soak.

In the meantime, the solution above is what I'll implement.

Sounds good 👍

@danielbachhuber danielbachhuber changed the title Conditional Logic for checks Conditionally run checks on multisite Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants