Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,14 +567,16 @@ 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);
}
} 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);
}

Expand Down