Open ITSecMedia opened 7 years ago
[INFO] Replacing existing vendor dependencies ... at that time glide already created a new empty vendor folder ... [ERROR] Unable to export dependencies to vendor directory: Error moving files: exit status 1. output: Access is denied. 0 dir(s) moved.
In
github.com/Masterminds/glide/path/winbug.go
function "func CustomRename(o, n string) error" replace the following line
cmd := exec.Command("cmd.exe", "/c", "copy", o, n)
to
cmd := exec.Command("robocopy.exe", o, n, "/e")
That solved the problem, at last on my machine.
func CustomRemoveAll(p string) error {
// Handle the windows case first
if runtime.GOOS == "windows" {
msg.Debug("Detected Windows. Removing files using windows command")
cmd := exec.Command("cmd.exe", "/c", fmt.Sprintf("rd /s /q %s", p))
output, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("Error removing files: %s. output: %s", err, output)
}
} else if detectWsl() {
cmd := exec.Command("rm", "-rf", p)
output, err2 := cmd.CombinedOutput()
msg.Debug("Detected Windows Subsystem for Linux. Removing files using subsystem command")
if err2 != nil {
return fmt.Errorf("Error removing files: %s. output: %s", err2, output)
}
}
return os.RemoveAll(p)
}
[INFO] --> Adding github.com/parnurzeal/gorequest to your configuration with th e version ^0.2.15 [INFO] Downloading dependencies. Please wait... [INFO] --> Fetching updates for github.com/parnurzeal/gorequest [INFO] Resolving imports [INFO] Downloading dependencies. Please wait... [INFO] --> Detected semantic version. Setting version for github.com/parnurzeal /gorequest to v0.2.15 [INFO] Exporting resolved dependencies... [INFO] --> Exporting github.com/parnurzeal/gorequest [INFO] Replacing existing vendor dependencies [ERROR] Unable to export dependencies to vendor directory: Error moving files: e xit status 1. output:
最新版的glide还是有这个问题 windows环境
me too, win10 X64
Hello, I had the same issue here on win10, I solved it by removing windows UAC (setting it at the lower level - which is not recommanded)
@silversurfer34 check my comment above.
Patch file github.com/Masterminds/glide/path/winbug.go according to the instructions above, recompile Glide and your problem is solved.
As ITSecMedia said, the good ay to solve the issue is to patch winbug.go file (you can use this https://github.com/Masterminds/glide/pull/889/commits/cc37dc711a3191c2b91b01b9593c685660eeb9af) then recompile it (look at the makefile for the command if you are on windows)
I modified the winbug.go ,and run "go get -u github.com/Masterminds/glide " again,then "glide install" command can works
I meet this problem too. And I replaced glide.exe to old version, it works.I think it is a bug in current version.
Robocopy fix from ITSecMedia above works for me - "I know, why don't we merge that in?", "yeh, good idea, been broken for a couple months, 1 line fix right there"
i replaced glide.exe to 0.12.3, it works
@ITSecMedia Thank you for your solution. but robocopy
return 1 when files were copied successfully, and os/exec
throw an error which was exit status 1
.
.
D:\Work\Golang_Share\bin\glide.exe get github.com/smallnest/rpcx [INFO] Preparing to install 1 package. [INFO] Attempting to get package github.com/smallnest/rpcx [INFO] --> Gathering release information for github.com/smallnest/rpcx [INFO] The package github.com/smallnest/rpcx appears to have Semantic Version releases (http://semver.org). [INFO] The latest release is v3.0-rc2. You are currently not using a release. Would you like [INFO] to use this release? Yes (Y) or No (N) y [INFO] The package github.com/smallnest/rpcx appears to use semantic versions (http://semver.org). [INFO] Would you like to track the latest minor or patch releases (major.minor.patch)? [INFO] The choices are: [INFO] - Tracking minor version releases would use '>= 3.0.0-rc2, < 4.0.0' ('^3.0.0-rc2') [INFO] - Tracking patch version releases would use '>= 3.0.0-rc2, < 3.1.0' ('~3.0.0-rc2') [INFO] - Skip using ranges [INFO] For more information on Glide versions and ranges see https://glide.sh/docs/versions [INFO] Minor (M), Patch (P), or Skip Ranges (S)? m [INFO] --> Adding github.com/smallnest/rpcx to your configuration with the version ^3.0.0-rc2 [INFO] Downloading dependencies. Please wait... [INFO] --> Fetching updates for github.com/smallnest/rpcx [INFO] Resolving imports [INFO] Downloading dependencies. Please wait... [INFO] --> Fetching updates for github.com/Masterminds/semver [INFO] --> Fetching updates for gopkg.in/yaml.v2 [INFO] --> Fetching updates for github.com/codegangsta/cli [INFO] --> Fetching updates for github.com/Masterminds/vcs [INFO] --> Fetching updates for github.com/mitchellh/go-homedir [INFO] --> Detected semantic version. Setting version for github.com/smallnest/rpcx to v3.0 [INFO] Exporting resolved dependencies... [INFO] --> Exporting github.com/smallnest/rpcx [INFO] --> Exporting github.com/codegangsta/cli [INFO] --> Exporting github.com/Masterminds/vcs [INFO] --> Exporting github.com/Masterminds/semver [INFO] --> Exporting github.com/mitchellh/go-homedir [INFO] --> Exporting gopkg.in/yaml.v2 [INFO] Replacing existing vendor dependencies [ERROR] Unable to export dependencies to vendor directory: Error removing files: exit status 123. output: �t�@�C�� ���A�f�B���N�g�����A�܂��̓{�����[�� ���x���̍\�����Ԉ����Ă��܂��B
OS: Windows 10 64bit (1709 16299.64) last ver is error exit, 0.12.3 is worked.
Checkout 4b407b34822cd21100f0b12f14a00eec21867166 solve this issue.
neither 0.13.1 nor 0.13.2 can work
D:\GoglandProjects\src\github.com\Eddie-he\watchdog>glide install [INFO] Lock file (glide.lock) does not exist. Performing update. [INFO] Downloading dependencies. Please wait... [INFO] --> Fetching updates for github.com/coreos/etcd [ERROR] Update failed for github.com/coreos/etcd: Unable to retrieve local repo information: exit status 1 [ERROR] Failed to do initial checkout of config: Unable to retrieve local repo information: exit status 1
D:\GoglandProjects\src\github.com\Eddie-he\watchdog>glide --version glide version 0.13.2-dev
The version glide doesn't work.(win7 x86_64)
Same issue here.
I had to downgrade to 0.12.3 to solve this issue!
it works with glide.exe 0.12.3 on Windows 7 64Bit
Anybody working on this?
0.12.3 worked on win10 64bit 0.13.1 not work.
@ITSecMedia In your way, my project, only created vendor file,but Not created .lock file, why?
Same for me 0.12.3 worked on win10 64bit but latest release 0.13.1 did not work
0.12.3 work for me +1
Windows 10 64-bit.
@silversurfer34 thanks for your help, I have resolved it
i have already modify my winbug.go;but still failed. windows 10 64-bit @ ITSecMedia func CustomRename(o, n string) error {
// Handking windows cases first
if runtime.GOOS == "windows" {
msg.Debug("Detected Windows. Moving files using windows command")
// cmd := exec.Command("cmd.exe", "/c", "move", o, n)
cmd := exec.Command("robocopy.exe", o, n, "/e")
// cmd := exec.Command("cmd.exe", "/c", "xcopy /s/y", o, n+"\\") //新增这一行代码
output, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("Error moving files: %s. output: %s", err, output)
}
return nil
} else if detectWsl() {
cmd := exec.Command("mv", o, n)
output, err2 := cmd.CombinedOutput()
msg.Debug("Detected Windows Subsystem for Linux. Removing files using subsystem command")
if err2 != nil {
return fmt.Errorf("Error moving files: %s. output: %s", err2, output)
}
return nil
}
return os.Rename(o, n)
}
��ʼʱ��: 2018��4��10�� 17:37:05 Դ: C:\Users\FENGKO~1\AppData\Local\Temp\glide-vendor945057275\vendor\ Ŀ��: D:\myproject\godemo\src\vendor\
�ļ�: *.*
ѡ��: *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30
��Ŀ¼ 0 C:\Users\FENGKO~1\AppData\Local\Temp\glide-vendor945057275\vendor\
��Ŀ¼ 0 C:\Users\FENGKO~1\AppData\Local\Temp\glide-vendor945057275\vendor\github.com\
��Ŀ¼ 0 C:\Users\FENGKO~1\AppData\Local\Temp\glide-vendor945057275\vendor\github.com\gin-contrib\
��Ŀ¼ 8 C:\Users\FENGKO~1\AppData\Local\Temp\glide-vendor945057275\vendor\github.com\gin-contrib\sse\
100% ���ļ� 215 .travis.yml 100% ���ļ� 1112 LICENSE 100% ���ļ� 1802 README.md 100% ���ļ� 3854 sse-decoder.go 100% ���ļ� 2260 sse-decoder_test.go 100% ���ļ� 2366 sse-encoder.go 100% ���ļ� 5477 sse_test.go 100% ���ļ� 419 writer.go ��Ŀ¼ 0 C:\Users\FENGKO~1\AppData\Local\Temp\glide-vendor945057275\vendor\github.com\gin-gonic\ ��Ŀ¼ 46 C:\Users\FENGKO~1\AppData\Local\Temp\glide-vendor945057275\vendor\github.com\gin-gonic\gin\ 100% ���ļ� 56 .gitignore 100% ���ļ� 584 .travis.yml
why the modification wasn't merged into master branch?
...but seems like 0.13.1 doesn't - I see the same error there.
me too on the windows7 and windows10 glide version v0.13.1
Same issue, at the end I just migrated the project do dep
to unblock it (a simple dep init
imports everything from glide
)
the same issue on windows7 and glide v0.13.2-dev
I have the same issue on v0.13.3
Why not update to the warehouse? I encountered this problem again in 2021
I've tried it 20 times, current glide doesn't work here no more on Windows 10 x64 I cleared caches, re-opened explorer, killed all handles, removed vendor ....