diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php index 3459569a7..7f92b2503 100644 --- a/src/Composer/Command/ConfigCommand.php +++ b/src/Composer/Command/ConfigCommand.php @@ -117,7 +117,7 @@ EOT if ($input->getOption('global') && !$this->configFile->exists()) { touch($this->configFile->getPath()); $this->configFile->write(array('config' => new \ArrayObject)); - chmod($this->configFile->getPath(), 0600); + @chmod($this->configFile->getPath(), 0600); } if (!$this->configFile->exists()) { diff --git a/src/Composer/Command/SelfUpdateCommand.php b/src/Composer/Command/SelfUpdateCommand.php index 07ed9eae1..d37598b04 100644 --- a/src/Composer/Command/SelfUpdateCommand.php +++ b/src/Composer/Command/SelfUpdateCommand.php @@ -72,7 +72,7 @@ EOT } try { - chmod($tempFilename, 0777 & ~umask()); + @chmod($tempFilename, 0777 & ~umask()); // test the phar validity $phar = new \Phar($tempFilename); // free the variable to unlock the file diff --git a/src/Composer/Config/JsonConfigSource.php b/src/Composer/Config/JsonConfigSource.php index 27d922853..5223eb5d2 100644 --- a/src/Composer/Config/JsonConfigSource.php +++ b/src/Composer/Config/JsonConfigSource.php @@ -124,7 +124,7 @@ class JsonConfigSource implements ConfigSourceInterface } if ($newFile) { - chmod($this->file->getPath(), 0600); + @chmod($this->file->getPath(), 0600); } } } diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php index 9d78ba1e6..c883120f4 100644 --- a/src/Composer/Installer/LibraryInstaller.php +++ b/src/Composer/Installer/LibraryInstaller.php @@ -205,7 +205,7 @@ class LibraryInstaller implements InstallerInterface // likely leftover from a previous install, make sure // that the target is still executable in case this // is a fresh install of the vendor. - chmod($link, 0777 & ~umask()); + @chmod($link, 0777 & ~umask()); } $this->io->write(' Skipped installation of '.$bin.' for package '.$package->getName().': name conflicts with an existing file'); continue; @@ -214,7 +214,7 @@ class LibraryInstaller implements InstallerInterface // add unixy support for cygwin and similar environments if ('.bat' !== substr($binPath, -4)) { file_put_contents($link, $this->generateUnixyProxyCode($binPath, $link)); - chmod($link, 0777 & ~umask()); + @chmod($link, 0777 & ~umask()); $link .= '.bat'; if (file_exists($link)) { $this->io->write(' Skipped installation of '.$bin.'.bat proxy for package '.$package->getName().': a .bat proxy was already installed'); @@ -238,7 +238,7 @@ class LibraryInstaller implements InstallerInterface } chdir($cwd); } - chmod($link, 0777 & ~umask()); + @chmod($link, 0777 & ~umask()); } } diff --git a/src/Composer/Installer/PearInstaller.php b/src/Composer/Installer/PearInstaller.php index 1a8f674af..b44f61f14 100644 --- a/src/Composer/Installer/PearInstaller.php +++ b/src/Composer/Installer/PearInstaller.php @@ -99,9 +99,9 @@ class PearInstaller extends LibraryInstaller { parent::initializeBinDir(); file_put_contents($this->binDir.'/composer-php', $this->generateUnixyPhpProxyCode()); - chmod($this->binDir.'/composer-php', 0777); + @chmod($this->binDir.'/composer-php', 0777); file_put_contents($this->binDir.'/composer-php.bat', $this->generateWindowsPhpProxyCode()); - chmod($this->binDir.'/composer-php.bat', 0777); + @chmod($this->binDir.'/composer-php.bat', 0777); } protected function generateWindowsProxyCode($bin, $link)