Laravel\Envoy\ConfigurationParser::getHomeDirectory PHP Method

getHomeDirectory() protected method

Get the home directory for the user based on OS.
protected getHomeDirectory ( string $user ) : string | null
$user string
return string | null
    protected function getHomeDirectory($user)
    {
        $system = strtolower(php_uname());
        if (str_contains($system, 'darwin')) {
            return "/Users/{$user}";
        } elseif (str_contains($system, 'windows')) {
            return "C:\\Users\\{{$user}}";
        } elseif (str_contains($system, 'linux')) {
            return "/home/{$user}";
        }
    }