public function getDeploymentsBasePath($path = null)
    {
        $localDeploymentDescription = @realpath('./.surf');
        if (! $path && is_dir($localDeploymentDescription)) {
            $path = $localDeploymentDescription;
        }
        $path = $path ?: Files::concatenatePaths([$this->getHomeDir(), 'deployments']);
        $this->ensureDirectoryExists($path);

        return $path;
    }