private function initializeRemotePath($skipSync)
    {
        $this->repoDir = $this->config->get('cache-vcs-dir').'/'.preg_replace('{[^a-z0-9.]}i', '-', $this->url).'/';

        GitUtil::cleanEnv();

        $fs = new Filesystem();
        $fs->ensureDirectoryExists(\dirname($this->repoDir));

        if (!is_writable(\dirname($this->repoDir))) {
            throw new \RuntimeException('Can not clone '.$this->url.' to access package information. The "'.\dirname($this->repoDir).'" directory is not writable by the current user.');
        }

        if (preg_match('{^ssh://[^@]+@[^:]+:[^0-9]+}', $this->url)) {
            throw new \InvalidArgumentException('The source URL '.$this->url.' is invalid, ssh URLs should have a port number after ":".'."\n".'Use ssh://git@example.com:22/path or just git@example.com:path if you do not want to provide a password or custom port.');
        }

        $gitUtil = new GitUtil($this->io, $this->config, $this->process, $fs);
        // patched line, sync from local dir without modifying url
        if (!$skipSync && !$gitUtil->syncMirror($this->url, $this->repoDir)) {
            $this->io->writeError('<error>Failed to update '.$this->url.', package information from this repository may be outdated</error>');
        }

        return $this->url;
    }
private function initializeRemotePath($skipSync)
    {
        $this->repoDir = $this->config->get('cache-vcs-dir').'/'.preg_replace('{[^a-z0-9.]}i', '-', $this->url).'/';

        GitUtil::cleanEnv();

        $fs = new Filesystem();
        $fs->ensureDirectoryExists(\dirname($this->repoDir));

        if (!is_writable(\dirname($this->repoDir))) {
            throw new \RuntimeException('Can not clone '.$this->url.' to access package information. The "'.\dirname($this->repoDir).'" directory is not writable by the current user.');
        }

        if (preg_match('{^ssh://[^@]+@[^:]+:[^0-9]+}', $this->url)) {
            throw new \InvalidArgumentException('The source URL '.$this->url.' is invalid, ssh URLs should have a port number after ":".'."\n".'Use ssh://git@example.com:22/path or just git@example.com:path if you do not want to provide a password or custom port.');
        }

        $gitUtil = new GitUtil($this->io, $this->config, $this->process, $fs);
        // patched line, sync from local dir without modifying url
        if (!$skipSync && !$gitUtil->syncMirror($this->url, $this->repoDir)) {
            $this->io->writeError('<error>Failed to update '.$this->url.', package information from this repository may be outdated</error>');
        }

        return $this->url;
    }
private function initializeRemotePath ( $ skipSync ) { $ this -> repoDir = $ this -> config -> get ( 'cache-vcs-dir' ) . '/' . preg_replace ( '{[^a-z0-9.]}i' , '-' , $ this -> url ) . '/' ; GitUtil :: cleanEnv ( ) ; $ fs = new Filesystem ( ) ; $ fs -> ensureDirectoryExists ( \ dirname ( $ this -> repoDir ) ) ; if ( ! is_writable ( \ dirname ( $ this -> repoDir ) ) ) { throw new \ RuntimeException ( 'Can not clone ' . $ this -> url . ' to access package information. The "' . \ dirname ( $ this -> repoDir ) . '" directory is not writable by the current user.' ) ; } if ( preg_match ( '{^ssh://[^@]+@[^:]+:[^0-9]+}' , $ this -> url ) ) { throw new \ InvalidArgumentException ( 'The source URL ' . $ this -> url . ' is invalid, ssh URLs should have a port number after ":".' . "\n" . 'Use ssh://git@example.com:22/path or just git@example.com:path if you do not want to provide a password or custom port.' ) ; } $ gitUtil = new GitUtil ( $ this -> io , $ this -> config , $ this -> process , $ fs ) ; // patched line, sync from local dir without modifying url if ( ! $ skipSync && ! $ gitUtil -> syncMirror ( $ this -> url , $ this -> repoDir ) ) { $ this -> io -> writeError ( '<error>Failed to update ' . $ this -> url . ', package information from this repository may be outdated</error>' ) ; } return $ this -> url ; }
Initialize the remote path.

@param bool $skipSync Check if sync must be skipped

@return string
Initialize the remote path .