Skip to content

Commit 2d2c2e4

Browse files
committed
Fix warnings when using Valet in non-CLI context
1 parent 69f432e commit 2d2c2e4

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

cli/includes/helpers.php

Lines changed: 9 additions & 7 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');
15-
define('VALET_HOME_PATH', $_SERVER['HOME'].'/.config/valet');
16-
define('VALET_SERVER_PATH', realpath(__DIR__.'/../../server.php'));
13+
if (! defined('VALET_HOME_PATH')) {
14+
define('VALET_HOME_PATH', $_SERVER['HOME'] . '/.config/valet');
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)