Make sure Phar overwrites files and doesn't load them
parent
4af69c85ca
commit
8803281648
|
@ -34,6 +34,11 @@ class PharArchiver implements ArchiverInterface
|
||||||
{
|
{
|
||||||
$sources = realpath($sources);
|
$sources = realpath($sources);
|
||||||
|
|
||||||
|
// Phar would otherwise load the file which we don't want
|
||||||
|
if (file_exists($target)) {
|
||||||
|
unlink($target);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$phar = new \PharData($target, null, null, static::$formats[$format]);
|
$phar = new \PharData($target, null, null, static::$formats[$format]);
|
||||||
$files = new ArchivableFilesFinder($sources, $excludes);
|
$files = new ArchivableFilesFinder($sources, $excludes);
|
||||||
|
|
Loading…
Reference in New Issue