kevincobain2000 / gobrew

Go version manager, written in Go. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.
https://medium.com/web-developer/go-version-manager-gobrew-c8750157dfe6
MIT License
358 stars 24 forks source link

Bug: Windows 10 Symlink required privilege #174

Closed vunhatchuong closed 5 months ago

vunhatchuong commented 5 months ago

Problem

Windows 10 symlink required privilege: image

Looks like it hasn't been resolved: https://github.com/golang/go/issues/22874

Solution

You can either require privilege or use cmd through os.exec.Command:

if runtime.GOOS == "windows" {
    if err = exec.Command("cmd", "mklink", "/d", link , destination).Run(); err == nil {
        return nil
    }
}
kevincobain2000 commented 5 months ago

Thanks for reporting. Pull req too please?

vunhatchuong commented 5 months ago

Ok I'll try