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

Make sure Sites dir is linked

This commit is contained in:
Erik Berkun-Drevnig
2017-11-27 01:39:27 -05:00
parent 19fe60880c
commit f33bff81e9
3 changed files with 6 additions and 4 deletions

View File

@@ -46,6 +46,7 @@ function createConfigurationDirectory()
$oldPath = posix_getpwuid(fileowner(__FILE__))['dir'].'/.valet'; $oldPath = posix_getpwuid(fileowner(__FILE__))['dir'].'/.valet';
if ($this->files->isDir($oldPath)) { if ($this->files->isDir($oldPath)) {
$this->prependPath(VALET_HOME_PATH.'/Sites');
rename($oldPath, VALET_HOME_PATH); rename($oldPath, VALET_HOME_PATH);
} }
} }

View File

@@ -2,8 +2,6 @@
namespace Valet; namespace Valet;
use DomainException;
class Site class Site
{ {
var $config, $cli, $files; var $config, $cli, $files;
@@ -71,7 +69,7 @@ function links() {
$certs = $this->getCertificates($certsPath); $certs = $this->getCertificates($certsPath);
return $this->getLinks(VALET_HOME_PATH.'/Sites', $certs); return $this->getLinks($this->sitesPath(), $certs);
} }
/** /**

View File

@@ -2,6 +2,8 @@
namespace Valet; namespace Valet;
use Httpful\Request;
class Valet class Valet
{ {
var $cli, $files; var $cli, $files;
@@ -58,10 +60,11 @@ function extensions()
* *
* @param string $currentVersion * @param string $currentVersion
* @return bool * @return bool
* @throws \Httpful\Exception\ConnectionErrorException
*/ */
function onLatestVersion($currentVersion) 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'), '>='); return version_compare($currentVersion, trim($response->body->tag_name, 'v'), '>=');
} }