diff --git a/src/Installer.php b/src/Installer.php index b53129c..1e75608 100644 --- a/src/Installer.php +++ b/src/Installer.php @@ -567,7 +567,7 @@ public function update(InstalledRepositoryInterface $repo, PackageInterface $ini $stashPath = null; $basePath = null; - if ($this->getUpdateStrategy() === self::UPDATE_STRATEGY_MERGE) { + if ($this->getUpdateStrategy() === self::UPDATE_STRATEGY_MERGE && $initial->getDistType() !== 'path') { $stashPath = $this->stashModuleDir($this->getInstallPath($initial)); if ($stashPath !== null) { $basePath = sys_get_temp_dir().'/module-base-'.uniqid('', true); @@ -575,6 +575,8 @@ public function update(InstalledRepositoryInterface $repo, PackageInterface $ini } else { // Overwrite: stash for rollback safety rather than deleting outright. // $basePath stays null, which signals overwrite mode in the callbacks. + // Also covers initial=path: there's no remote dist to download as merge base, + // and stashing first would make the path inaccessible to PathDownloader. $stashPath = $this->stashModuleDir($installPath); }