Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Commit 878931d

Browse files
committed
mproved the way we display the executed isntaller command
1 parent 40923b5 commit 878931d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/Symfony/Installer/AboutCommand.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,20 @@ protected function execute(InputInterface $input, OutputInterface $output)
8181
$output->writeln(sprintf($commandHelp,
8282
$this->appVersion,
8383
str_repeat('=', 20 + strlen($this->appVersion)),
84-
$_SERVER['PHP_SELF']
84+
$this->getInstallerExecutable()
8585
));
8686
}
87+
88+
/**
89+
* Returns the executed command.
90+
*
91+
* @return string
92+
*/
93+
private function getInstallerExecutable()
94+
{
95+
$executedCommand = $_SERVER['PHP_SELF'];
96+
$executedCommand = preg_replace('~/usr/local/bin/~', '', $executedCommand);
97+
98+
return $executedCommand;
99+
}
87100
}

src/Symfony/Installer/NewCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,9 @@ private function getExecutedCommand()
562562
$version = $this->version;
563563
}
564564

565-
return sprintf('%s new %s %s', $_SERVER['PHP_SELF'], $this->projectName, $version);
565+
$executedCommand = $_SERVER['PHP_SELF'];
566+
$executedCommand = preg_replace('~/usr/local/bin/~', '', $executedCommand);
567+
568+
return sprintf('%s new %s %s', $executedCommand, $this->projectName, $version);
566569
}
567570
}

0 commit comments

Comments
 (0)