1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 00:40:06 +01:00

link on every install

This commit is contained in:
Taylor Otwell
2016-05-10 16:33:17 -05:00
parent 0e4e81f929
commit 289d806060
2 changed files with 9 additions and 1 deletions

View File

@@ -199,15 +199,20 @@ function copyAsUser($from, $to)
*
* @param string $target
* @param string $link
* @param string|null $owner
* @return void
*/
function symlink($target, $link)
function symlink($target, $link, $owner = null)
{
if ($this->exists($link)) {
$this->unlink($link);
}
symlink($target, $link);
if ($owner) {
$this->chown($link, $owner);
}
}
/**

View File

@@ -54,6 +54,9 @@
Caddy::restart();
CommandLine::quietly('rm /usr/local/bin/valet');
Filesystem::symlink(realpath(__DIR__.'/../valet'), '/usr/local/bin/valet', user());
output(PHP_EOL.'<info>Valet installed successfully!</info>');
});