You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code, which resolves the location of the glide home when the GLIDE_HOME environment variable is not set, is unreliable. It uses os/user, which in turn uses cgo, which doesn't work when cross-compiling, which I assume you must be doing.
The result is that glide home resolves as documented on a Mac, but on a Linux machine (which, of course, includes any Docker container), the logic above falls back to resolving the glide home as filepath.Join(cwd, ".glide").
While that's not entirely inconvenient, it is, to say the least, surprising and undocumented OS-specific behavior.
The following code, which resolves the location of the glide home when the
GLIDE_HOME
environment variable is not set, is unreliable. It usesos/user
, which in turn uses cgo, which doesn't work when cross-compiling, which I assume you must be doing.https://github.com/Masterminds/glide/blob/master/path/path.go#L40-L62
The result is that glide home resolves as documented on a Mac, but on a Linux machine (which, of course, includes any Docker container), the logic above falls back to resolving the glide home as
filepath.Join(cwd, ".glide")
.While that's not entirely inconvenient, it is, to say the least, surprising and undocumented OS-specific behavior.
This could be corrected by abandoning the use of
os/user
in favor of https://github.com/mitchellh/go-homedir, which does not rely on cgo.@mattfarina @technosophos I'd be happy to submit a PR for this if you agree with my assessment of the problem and my proposed solution.
The text was updated successfully, but these errors were encountered: