Thinking--glide a bug on Windows

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Glide

Glide is a dependency management tool for Go (unofficial), I downloaded the release version of 0.13.1 and then found an error after executing on Windows glide install

[ERROR] Unable to export dependencies to vendor directory: Error moving files: exit status 1. output: Access is denied. 0 dir(s) moved

Reason

The reason Google finds out is that the customrename function in github.com/masterminds/glide/path/winbug.go

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)        output, err := cmd.CombinedOutput()        if err != nil {            return fmt.Errorf("Error moving files: %s. output: %s", err, output)        }

Error occurred in cmd: = Exec.command ("cmd.exe", "/C", "Move", O, N) here, calling the move function on Windows has a permission error.
Google can instead (according to the original submission record):

cmd := exec.Command("cmd.exe", "/c", "xcopy /s/y", o, n+"\\")

Test

Recompile the build Glide.exein the glide source directory and put it in the $GOPATH/bin directory (remember to place the directory in the environment variable path)

However, the problem should be fixed soon after ^_^

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.