From 41a87a3ae7bce14930b4a25c8c6a08a15b928bda Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 23 Sep 2015 00:41:24 +0100 Subject: [PATCH] Adjust file path output, refs #4379 --- src/Composer/Command/ArchiveCommand.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Composer/Command/ArchiveCommand.php b/src/Composer/Command/ArchiveCommand.php index b9cdf03cc..8114435b2 100644 --- a/src/Composer/Command/ArchiveCommand.php +++ b/src/Composer/Command/ArchiveCommand.php @@ -19,6 +19,7 @@ use Composer\Repository\CompositeRepository; use Composer\Script\ScriptEvents; use Composer\Plugin\CommandEvent; use Composer\Plugin\PluginEvents; +use Composer\Util\Filesystem; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -106,7 +107,11 @@ EOT $io->writeError('Creating the archive into "'.$dest.'".'); $packagePath = $archiveManager->archive($package, $format, $dest); - $io->writeError('Created archive file path: "'.$packagePath.'"'); + $fs = new Filesystem; + $shortPath = $fs->findShortestPath(getcwd(), $packagePath, true); + + $io->writeError('Created: ', false); + $io->write(strlen($shortPath) < strlen($packagePath) ? $shortPath : $packagePath); return 0; }