1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00

Remove '/Users/' prefix

This commit is contained in:
Pantelis Peslis
2016-05-06 23:20:54 +03:00
parent f4ccf1c57c
commit bf5fc07cec
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
/** /**
* Define the user's "~/.valet" path. * Define the user's "~/.valet" path.
*/ */
define('VALET_HOME_PATH', '/Users/'.posix_getpwuid(fileowner(__FILE__))['name'].'/.valet'); define('VALET_HOME_PATH', posix_getpwuid(fileowner(__FILE__))['dir'].'/.valet');
/** /**
* De-escalate root privileges down to Valet directory owner. * De-escalate root privileges down to Valet directory owner.

View File

@@ -73,7 +73,7 @@ protected static function download($output)
*/ */
protected static function createCustomConfigurationFile() protected static function createCustomConfigurationFile()
{ {
$dnsMasqConfigPath = '/Users/'.$_SERVER['SUDO_USER'].'/.valet/dnsmasq.conf'; $dnsMasqConfigPath = $_SERVER['HOME'].'/.valet/dnsmasq.conf';
if (! file_exists('/usr/local/etc/dnsmasq.conf')) { if (! file_exists('/usr/local/etc/dnsmasq.conf')) {
copy('/usr/local/opt/dnsmasq/dnsmasq.conf.example', '/usr/local/etc/dnsmasq.conf'); copy('/usr/local/opt/dnsmasq/dnsmasq.conf.example', '/usr/local/etc/dnsmasq.conf');