Skip to content

Commit 0158853

Browse files
ReplicaObscuraBen McClure
authored andcommitted
Don't attempt to search for .git directories in postPackageInstall if there is no valid package directory.
1 parent df3540f commit 0158853

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Handler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ public function deleteVcsDirs(array $dirs) {
8989
* @param \Composer\Package\PackageInterface $package
9090
*/
9191
public function onPostPackageEvent(PackageInterface $package) {
92-
$this->cleanupVcsDirs($this->composer->getInstallationManager()->getInstallPath($package));
92+
$packagePath = $this->composer->getInstallationManager()->getInstallPath($package);
93+
94+
if (!empty($packagePath)) {
95+
$this->cleanupVcsDirs($packagePath);
96+
}
9397
}
9498
}

0 commit comments

Comments
 (0)