Respect umask in chmod calls
parent
ada8d69507
commit
4a55d85a2d
|
@ -53,7 +53,7 @@ EOT
|
||||||
$rfs->copy('getcomposer.org', $remoteFilename, $tempFilename);
|
$rfs->copy('getcomposer.org', $remoteFilename, $tempFilename);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
chmod($tempFilename, 0755);
|
chmod($tempFilename, 0777 & ~umask());
|
||||||
// test the phar validity
|
// test the phar validity
|
||||||
$phar = new \Phar($tempFilename);
|
$phar = new \Phar($tempFilename);
|
||||||
// free the variable to unlock the file
|
// free the variable to unlock the file
|
||||||
|
|
|
@ -152,7 +152,7 @@ class LibraryInstaller implements InstallerInterface
|
||||||
// likely leftover from a previous install, make sure
|
// likely leftover from a previous install, make sure
|
||||||
// that the target is still executable in case this
|
// that the target is still executable in case this
|
||||||
// is a fresh install of the vendor.
|
// is a fresh install of the vendor.
|
||||||
chmod($link, 0755);
|
chmod($link, 0777 & ~umask());
|
||||||
}
|
}
|
||||||
$this->io->write('Skipped installation of '.$bin.' for package '.$package->getName().', name conflicts with an existing file');
|
$this->io->write('Skipped installation of '.$bin.' for package '.$package->getName().', name conflicts with an existing file');
|
||||||
continue;
|
continue;
|
||||||
|
@ -163,7 +163,7 @@ class LibraryInstaller implements InstallerInterface
|
||||||
// add unixy support for cygwin and similar environments
|
// add unixy support for cygwin and similar environments
|
||||||
if ('.bat' !== substr($bin, -4)) {
|
if ('.bat' !== substr($bin, -4)) {
|
||||||
file_put_contents($link, $this->generateUnixyProxyCode($bin, $link));
|
file_put_contents($link, $this->generateUnixyProxyCode($bin, $link));
|
||||||
chmod($link, 0755);
|
chmod($link, 0777 & ~umask());
|
||||||
$link .= '.bat';
|
$link .= '.bat';
|
||||||
}
|
}
|
||||||
file_put_contents($link, $this->generateWindowsProxyCode($bin, $link));
|
file_put_contents($link, $this->generateWindowsProxyCode($bin, $link));
|
||||||
|
@ -177,7 +177,7 @@ class LibraryInstaller implements InstallerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
chmod($link, 0755);
|
chmod($link, 0777 & ~umask());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue