cli/setup: Do not return false; after $this->fail()
$this-fail() throws an exception.
This commit is contained in:
parent
9de1b20d3c
commit
f9ca0296a4
|
@ -60,20 +60,23 @@ class ConfigCommand extends Command
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false === mkdir($configDir)) {
|
if (! mkdir($configDir)) {
|
||||||
$this->fail(sprintf($this->translate('Unable to create path: %s'), $configDir));
|
$this->fail(sprintf($this->translate('Can\'t create configuration directory %s'), $configDir));
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! chmod($configDir, octdec($mode))) {
|
if (! chmod($configDir, octdec($mode))) {
|
||||||
$this->fail($this->translate(
|
$this->fail(sprintf(
|
||||||
'Unable to change the mode of the configuration directory'
|
$this->translate('Can\'t change the mode of the configuration directory to %s'),
|
||||||
|
$mode
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chgrp($configDir, $group) === false) {
|
if (! chgrp($configDir, $group)) {
|
||||||
$this->fail(sprintf($this->translate('Unable to change the group of "%s" to "%s".'), $configDir, $group));
|
$this->fail(sprintf(
|
||||||
return false;
|
$this->translate('Can\'t change the to change the group of %s to %s'),
|
||||||
|
$configDir,
|
||||||
|
$group
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
printf($this->translate("Successfully created configuration directory at: %s\n"), $configDir);
|
printf($this->translate("Successfully created configuration directory at: %s\n"), $configDir);
|
||||||
|
|
Loading…
Reference in New Issue