Merge pull request #8151 from naderman/self-update-target
Allow overriding self-update target file with env var COMPOSER_SELF_UPDATE_TARGETpull/8180/head
commit
4afd50fec6
|
@ -351,6 +351,10 @@ TAGSPUBKEY
|
|||
@copy($localFilename, $backupTarget);
|
||||
}
|
||||
|
||||
if ($targetFilename = getenv('COMPOSER_SELF_UPDATE_TARGET')) {
|
||||
$localFilename = realpath($targetFilename) ?: $targetFilename;
|
||||
}
|
||||
|
||||
rename($newFilename, $localFilename);
|
||||
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue