Merge pull request #2091 from jaypea/archivemanager
cleanup temporary download location when archivingpull/2151/head
commit
af1f5a3423
|
@ -142,6 +142,13 @@ class ArchiveManager
|
|||
}
|
||||
|
||||
// Create the archive
|
||||
return $usableArchiver->archive($sourcePath, $target, $format, $package->getArchiveExcludes());
|
||||
$archivePath = $usableArchiver->archive($sourcePath, $target, $format, $package->getArchiveExcludes());
|
||||
|
||||
//cleanup temporary download
|
||||
if (!$package instanceof RootPackage) {
|
||||
$filesystem->removeDirectory($sourcePath);
|
||||
}
|
||||
|
||||
return $archivePath;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,9 @@ class ArchiveManagerTest extends ArchiverTest
|
|||
|
||||
$target = $this->getTargetName($package, 'tar');
|
||||
$this->assertFileExists($target);
|
||||
|
||||
$tmppath = sys_get_temp_dir().'/composer_archiver/'.$this->manager->getPackageFilename($package);
|
||||
$this->assertFileNotExists($tmppath);
|
||||
|
||||
unlink($target);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue