Skip to content

Commit

Permalink
Separate description and message. Add missing open tag. Improve output
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed Dec 15, 2015
1 parent 3c17eae commit 4df2cac
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Command/CheckSystemCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

class CheckSystemCommand extends Command {

protected $message = 'Checking system health.';

protected function configure(){
$this
->setName('upgrade:checkSystem')
Expand All @@ -40,6 +42,8 @@ protected function configure(){
protected function execute(InputInterface $input, OutputInterface $output){
$locator = $this->container['utils.locator'];
$fsHelper = $this->container['utils.filesystemhelper'];
$occRunner = $this->container['utils.occrunner'];

$collection = new Collection();

$rootDirItems= $locator->getRootDirItems();
Expand All @@ -61,7 +65,10 @@ protected function execute(InputInterface $input, OutputInterface $output){

if (count($notReadableFiles) || count($notWritableFiles)){
$output->writeln('<info>Please check if owner and permissions fot these files are correct.</info>');
$output->writeln('See https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#strong-perms-label for details.</info>');
$output->writeln('<info>See https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#strong-perms-label for details.</info>');
return 2;
} else {
$output->writeln(' - file permissions are ok.');
}
}

Expand Down
12 changes: 12 additions & 0 deletions src/Command/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,20 @@
namespace Owncloud\Updater\Command;

class Command extends \Symfony\Component\Console\Command\Command{
/**
* @var \Pimple\Container
*/
protected $container;

/**
* @var string
*/
protected $message = '';

public function getMessage(){
return $this->message;
}

public function setContainer($container){
$this->container = $container;
}
Expand Down

0 comments on commit 4df2cac

Please sign in to comment.