From f33bff81e954b0c24f3b027fb795667964bf51ea Mon Sep 17 00:00:00 2001 From: Erik Berkun-Drevnig Date: Mon, 27 Nov 2017 01:39:27 -0500 Subject: [PATCH] Make sure Sites dir is linked --- cli/Valet/Configuration.php | 1 + cli/Valet/Site.php | 4 +--- cli/Valet/Valet.php | 5 ++++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cli/Valet/Configuration.php b/cli/Valet/Configuration.php index 065138a..0957456 100644 --- a/cli/Valet/Configuration.php +++ b/cli/Valet/Configuration.php @@ -46,6 +46,7 @@ function createConfigurationDirectory() $oldPath = posix_getpwuid(fileowner(__FILE__))['dir'].'/.valet'; if ($this->files->isDir($oldPath)) { + $this->prependPath(VALET_HOME_PATH.'/Sites'); rename($oldPath, VALET_HOME_PATH); } } diff --git a/cli/Valet/Site.php b/cli/Valet/Site.php index 833ef7d..34a0d60 100644 --- a/cli/Valet/Site.php +++ b/cli/Valet/Site.php @@ -2,8 +2,6 @@ namespace Valet; -use DomainException; - class Site { var $config, $cli, $files; @@ -71,7 +69,7 @@ function links() { $certs = $this->getCertificates($certsPath); - return $this->getLinks(VALET_HOME_PATH.'/Sites', $certs); + return $this->getLinks($this->sitesPath(), $certs); } /** diff --git a/cli/Valet/Valet.php b/cli/Valet/Valet.php index 68e82f1..bf0b7aa 100644 --- a/cli/Valet/Valet.php +++ b/cli/Valet/Valet.php @@ -2,6 +2,8 @@ namespace Valet; +use Httpful\Request; + class Valet { var $cli, $files; @@ -58,10 +60,11 @@ function extensions() * * @param string $currentVersion * @return bool + * @throws \Httpful\Exception\ConnectionErrorException */ function onLatestVersion($currentVersion) { - $response = \Httpful\Request::get('https://api.github.com/repos/laravel/valet/releases/latest')->send(); + $response = Request::get('https://api.github.com/repos/laravel/valet/releases/latest')->send(); return version_compare($currentVersion, trim($response->body->tag_name, 'v'), '>='); }