Skip to content

Commit 6ba47ae

Browse files
authored
Merge pull request #1169 from gbuckingham89/master
Fix warnings when using Valet in non-CLI context
2 parents 69f432e + dffc682 commit 6ba47ae

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

cli/includes/helpers.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@
1010
/**
1111
* Define constants.
1212
*/
13-
if (! defined('VALET_LOOPBACK')) {
14-
define('VALET_LOOPBACK', '127.0.0.1');
13+
if (! defined('VALET_HOME_PATH')) {
1514
define('VALET_HOME_PATH', $_SERVER['HOME'].'/.config/valet');
16-
define('VALET_SERVER_PATH', realpath(__DIR__.'/../../server.php'));
15+
}
16+
if (! defined('VALET_STATIC_PREFIX')) {
1717
define('VALET_STATIC_PREFIX', '41c270e4-5535-4daa-b23e-c269744c2f45');
18+
}
1819

19-
define('VALET_LEGACY_HOME_PATH', $_SERVER['HOME'].'/.valet');
20+
define('VALET_LOOPBACK', '127.0.0.1');
21+
define('VALET_SERVER_PATH', realpath(__DIR__.'/../../server.php'));
22+
define('VALET_LEGACY_HOME_PATH', $_SERVER['HOME'].'/.valet');
2023

21-
define('BREW_PREFIX', (new CommandLine())->runAsUser('printf $(brew --prefix)'));
22-
}
24+
define('BREW_PREFIX', (new CommandLine())->runAsUser('printf $(brew --prefix)'));
2325

2426
/**
2527
* Output the given text to the console.

0 commit comments

Comments
 (0)