diff --git a/cumulusci/tasks/salesforce/check_components.py b/cumulusci/tasks/salesforce/check_components.py index 1baa57e2c1..0f2760a7c2 100644 --- a/cumulusci/tasks/salesforce/check_components.py +++ b/cumulusci/tasks/salesforce/check_components.py @@ -34,13 +34,12 @@ class CheckComponents(BaseSalesforceTask): def _init_options(self, kwargs): super(CheckComponents, self)._init_options(kwargs) - if "paths" in self.options: - if "name" in self.options: - raise TaskOptionsError("Please provide either --paths or --name") - elif "name" not in self.options: - raise TaskOptionsError( - "This task requires a plan/flow name or paths options. pass --paths or --name options" - ) + if "paths" in self.options and "name" in self.options: + raise TaskOptionsError("Please provide either --paths or --name") + if "paths" not in self.options and "name" not in self.options: + raise TaskOptionsError( + "This task requires a plan/flow name or paths options. Pass --paths or --name options" + ) def _run_task(self): # Check if paths are provided in options. Assuming to only check for those paths