fix: add support for windows home path

This commit is contained in:
Enzo Innocenzi
2020-06-17 19:41:40 +02:00
parent baa9819daf
commit 54e9d4757d
6 changed files with 1124 additions and 18 deletions

View File

@@ -18,13 +18,11 @@ class StoreAuthenticationTokenCommand extends Command
public function handle()
{
$config = config('expose', []);
if (! is_null($this->argument('token'))) {
$this->info('Setting the expose authentication token to "'.$this->argument('token').'"');
$configFile = implode(DIRECTORY_SEPARATOR, [
$_SERVER['HOME'],
$_SERVER['HOME'] ?? $_SERVER['USERPROFILE'],
'.expose',
'config.php',
]);