1
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
namespace think\composer;
|
||||
|
||||
use Composer\Installer\LibraryInstaller;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Repository\InstalledRepositoryInterface;
|
||||
|
||||
@@ -20,15 +19,16 @@ class ThinkExtend extends LibraryInstaller
|
||||
|
||||
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
|
||||
{
|
||||
parent::install($repo, $package);
|
||||
$this->copyExtraFiles($package);
|
||||
return parent::install($repo, $package)->then(function () use ($package) {
|
||||
$this->copyExtraFiles($package);
|
||||
});
|
||||
}
|
||||
|
||||
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
|
||||
{
|
||||
parent::update($repo, $initial, $target);
|
||||
$this->copyExtraFiles($target);
|
||||
|
||||
return parent::update($repo, $initial, $target)->then(function () use ($target) {
|
||||
$this->copyExtraFiles($target);
|
||||
});
|
||||
}
|
||||
|
||||
protected function copyExtraFiles(PackageInterface $package)
|
||||
@@ -74,4 +74,4 @@ class ThinkExtend extends LibraryInstaller
|
||||
{
|
||||
return 'think-extend' === $packageType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user