From 9358401eed4b6c11632c8768de72d04766d33b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Egyed?= <1ed@mailbox.hu> Date: Sat, 13 Apr 2013 17:01:43 +0200 Subject: [PATCH] resolve symbolic link in self-update command --- src/Composer/Command/SelfUpdateCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/SelfUpdateCommand.php b/src/Composer/Command/SelfUpdateCommand.php index b9381abb1..82f11af92 100644 --- a/src/Composer/Command/SelfUpdateCommand.php +++ b/src/Composer/Command/SelfUpdateCommand.php @@ -49,7 +49,7 @@ EOT $output->writeln(sprintf("Updating to version %s.", $latest)); $remoteFilename = $protocol . '://getcomposer.org/composer.phar'; - $localFilename = $_SERVER['argv'][0]; + $localFilename = realpath($_SERVER['argv'][0]) ?: $_SERVER['argv'][0]; $tempFilename = dirname($localFilename) . '/' . basename($localFilename, '.phar').'-temp.phar'; $rfs->copy('getcomposer.org', $remoteFilename, $tempFilename);