mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 08:40:09 +01:00
Make sure Sites dir is linked
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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'), '>=');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user