Explorar o código

Reuse current file permissions

Jérémy Derussé %!s(int64=10) %!d(string=hai) anos
pai
achega
e7f4014018
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Command/SelfUpdateCommand.php

+ 1 - 1
src/Composer/Command/SelfUpdateCommand.php

@@ -173,7 +173,7 @@ EOT
     protected function setLocalPhar($localFilename, $newFilename, $backupTarget = null)
     {
         try {
-            @chmod($newFilename, 0777 & ~umask());
+            @chmod($newFilename, fileperms($localFilename));
             if (!ini_get('phar.readonly')) {
                 // test the phar validity
                 $phar = new \Phar($newFilename);