On Windows, glide can only be used on the same disk drive that the default cache directory is located:
# glide install
[INFO] Downloading dependencies. Please wait...
[INFO] --> Found desired version locally ...
[INFO] Setting references.
[INFO] --> Setting version for ...
[INFO] Exporting resolved dependencies...
[INFO] --> Exporting ...
[INFO] Replacing existing vendor dependencies
[ERROR] Unable to export dependencies to vendor directory: rename C:\Users\MyUser\AppData\Local\Temp\glide-vendor439134107\vendor E:\workspace\src\...\vendor: The system cannot move the file to a different disk drive.
Workaround: create a folder outside your GoPath, but on the same disk, and pass that folder to glide via glide --tmp [folder].
Environment: Windows 7 32-bit (MinGW bash shell), Go 1.7, Glide v0.12.0.
On non-Windows environments this error was consistent to detect and handle the copy instead. It seems Windows errors significantly different here. Windows does have the cross-device error we are detecting but that's not what being returned where we expected it.
This is a bug. In the installers Export function.
We'll need to detect this case under Windows and make sure it works for non-English languages since I believe this error is coming directory from the system rather than Go.
For what it's worth, I found this regarding the error: https://msdn.microsoft.com/en-us/library/ms837428.aspx
If I'm reading this right, the core issue is that rename can't cross disk boundaries, so maybe use a move command instead?
@kofalt we actually have the ability to copy if over if the problem is different disks. It's just run based on the detection of a moving error (rather than other errors). This moving error is different than I'd previously seen in the code. Go, on most platforms, bubbles up a common error. Under windows it's skipping the common error and bubbling up a system error.
This will be easy to fix.
A PR with a proposed fix is up at #587
Most helpful comment
@kofalt we actually have the ability to copy if over if the problem is different disks. It's just run based on the detection of a moving error (rather than other errors). This moving error is different than I'd previously seen in the code. Go, on most platforms, bubbles up a common error. Under windows it's skipping the common error and bubbling up a system error.
This will be easy to fix.