Skip to content

Instantly share code, notes, and snippets.

@yellowandy
Created January 10, 2017 22:15
Show Gist options
  • Save yellowandy/703a609a14e4acade508915075c92fa2 to your computer and use it in GitHub Desktop.
Save yellowandy/703a609a14e4acade508915075c92fa2 to your computer and use it in GitHub Desktop.
//In ShadowUpgrader
protected function doHealthcheck()
{
//Inherits from CLI Parent
$parentHealthCheckPass = parent::doHealthcheck();
//Failures found
if(!$parentHealthCheckPass && $this->context['force']) {
echo "Health check failed (red flags). Please refer to the log file {$this->context['log']}\n";
echo "Option force was specified - not aborting due to failed healthcheck\n";
return true;
}
return $parentHealthCheckPass;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment