Skip to content

Commit

Permalink
Print error messages instead of throwing an exception if permissions …
Browse files Browse the repository at this point in the history
…could not be set
  • Loading branch information
quafzi committed Jan 17, 2014
1 parent a52953f commit 83b254c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Quafzi/Composer/MagentoCore/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,11 @@ protected function setMagentoPermissions()
protected function setPermissions($path, $dirmode, $filemode)
{
if (is_dir($path) ) {
if (!chmod($path, $dirmode)) {
throw new InstallerException(
sprintf(
'Failed to set permissions "%s" for directory "%s"',
decoct($dirmode),
$path
)
if (!@chmod($path, $dirmode)) {
echo sprintf(
'Failed to set permissions "%s" for directory "%s"',
decoct($dirmode),
$path
);
}
$dh = opendir($path);
Expand All @@ -101,7 +99,7 @@ protected function setPermissions($path, $dirmode, $filemode)
}
closedir($dh);
} elseif(is_file($path)) {
if (false == !chmod($path, $filemode)) {
if (false == !@chmod($path, $filemode)) {
echo sprintf(
'Failed to set permissions "%s" for file "%s"',
decoct($filemode),
Expand Down

0 comments on commit 83b254c

Please sign in to comment.