cortesi / modd

A flexible developer tool that runs processes and responds to filesystem changes
MIT License
2.79k stars 130 forks source link

go get: /mvdan.cc/sh/interp/interp.go:570:14: undefined: os.UserHomeDir #75

Closed juanpabloaj closed 4 years ago

juanpabloaj commented 5 years ago

If I try to install modd on golang:1.11-stretch

docker run --rm -ti golang:1.11-stretch go get -v github.com/cortesi/modd/cmd/modd
...
mvdan.cc/sh/interp
# mvdan.cc/sh/interp
src/mvdan.cc/sh/interp/interp.go:570:14: undefined: os.UserHomeDir

I get that error and the installation fails.

BTW: thanks a lot for modd is very useful :)

wader commented 5 years ago

Looks like os.UserHomeDir was added in go 1.12.

juanpabloaj commented 5 years ago

Looks like os.UserHomeDir was added in go 1.12.

Thanks, that could be the reason.

That line was added 20 hours ago (Sep 8, 2019, 6:06 PM)

https://github.com/mvdan/sh/commit/4a0ebd2f3c1b82ee08969e36423d78c8cbaffc3b#diff-86aa91ecb7ee5bf1e220929fd16d3ecfR570

wader commented 5 years ago

Aha! i wonder what this go.mod line means https://github.com/cortesi/modd/blob/master/go.mod#L22 hmm i would guess that v2.6.4 will not have that change? but not sure what +incompatible means

cortesi commented 4 years ago

I've just amended the recommended install command - this should be fixed by setting the GO11MODULE=on env variable. Please re-open if this doesn't work!