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:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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'), '>=');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user