symfony/symfony — Issue #2556: bin/vendors fails if Symfony is symlinked to a different drive (WINNT)
Author: icalvo
Created: 2011-11-03 17:16:48+00:00
State: open

For example, assume you have linked **C:\Users\icalvo\Documents\Symfony2** => **D:\Projects\Symfony2**

And CWD is **C:\Users\icalvo\Documents\Symfony2**

Then, **php bin/vendors install** will fail because it uses **dirname(__DIR__)** to get CWD and that returns **D:\Projects\Symfony2**. At some step it will do **cd D:\Projects\Symfony2\vendor\symfony**, but that won't change drive, so CWD is still **C:\Users\icalvo\Documents\Symfony2** and the subsequent git command fails when it doesn't find a repository.

A possible solution is to extract drive letter and change drive in addition to **cd** (only for WINNT).