Closed mykael22000 closed 7 months ago
So, this is, despite what it looks like, not a bug.
The relevant code for context:
// specifically don't mkdirall, if you have an invalid gopath in the first
// place, that's not on us to fix.
if err := os.Mkdir(bin, 0700); err != nil && !os.IsExist(err) {
return fmt.Errorf("failed to create %q: %v", bin, err)
}
in this case bin
is supposed to be $GOPATH/bin
. The options here are:
bin
folder if necessary but that is it.
Bug Description Installation fails with an error about it being unable to create a go/bin directory.
What did you do? I'm setting my system up to be able to write Grafana plug-ins. Upgrade Ubuntu WLS, install a few things. https://grafana.com/developers/plugin-tools/.
Instructions for installing mage from https://magefile.org/ were:
The final step failed:
What did you expect to happen? I expected the install to work.
What actually happened? The install failed. I manually created the directory and ran it again - and this time it worked. The error may have been because mage was the first time I'd tried running go on the system.
It looks like there may be an issue with go set up, as the mage command does not work, unless I cd into the go/bin directory and invoke it directly as .mage. Given the mage install script looks like it's meant to handle this, I may have some more patching to do.
Environment
Additional context
As far as I know, the go run bootstrap.go ran under my user account, the same one I was able to successfully manually create the go/bin directory from, so the failure shouldn't have been an authorization issue.