Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does it support windows? #25

Open
popwalker opened this issue Sep 1, 2021 · 5 comments
Open

does it support windows? #25

popwalker opened this issue Sep 1, 2021 · 5 comments

Comments

@popwalker
Copy link

I install go version on windows, it report a error:

 level=fatal msg="symlink C:\\Users\\username\\.go\\go1.16 C:\\Users\\username\\.go\\current: A required privilege is not held by the client."

when i execute goup command, got:

 level=fatal msg="readlink C:\\Users\\username\\.go\\current: The file or directory is not a reparse point."

does anyone knows how to solve this problem?

@alarangeiras
Copy link
Contributor

Hi,

I solved this problem putting windows in developer mode.

@ydd9090
Copy link

ydd9090 commented Nov 22, 2021

try open cmd window by administrator,it seems like can install go,but not support switch version on Windows

@mei-rune
Copy link
Contributor

mei-rune commented Jan 1, 2022

I fix it with SysinternalsSuite junction.exe

	err := os.Symlink(version, current)
	if err != nil {
		if runtime.GOOS == "windows" {
			var junction = os.Getenv("GOUP_JUNCTION")
			if junction == "" {
				junction = "d:\\tools\\SysinternalsSuite\\junction.exe"
			}
			cmd := exec.Command(junction, current, version)
			err := cmd.Run()
			if err == nil {
				return nil
			}
			fmt.Println(err)
		}
	}
	return err

@mei-rune
Copy link
Contributor

mei-rune commented Jul 27, 2022

fix it with mklink.exe also.

@zicheqingluo
Copy link

It's a shame windows isn't supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants