1
0
Fork 0

Merge pull request #8151 from naderman/self-update-target

Allow overriding self-update target file with env var COMPOSER_SELF_UPDATE_TARGET
pull/8180/head
Jordi Boggiano 2019-06-07 16:47:39 +02:00 committed by GitHub
commit 4afd50fec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -351,6 +351,10 @@ TAGSPUBKEY
@copy($localFilename, $backupTarget);
}
if ($targetFilename = getenv('COMPOSER_SELF_UPDATE_TARGET')) {
$localFilename = realpath($targetFilename) ?: $targetFilename;
}
rename($newFilename, $localFilename);
return null;