magefile / mage

a Make/rake-like dev tool using Go
https://magefile.org
Apache License 2.0
4.01k stars 250 forks source link

go run bootstrap.go #423

Closed CloudWise-Lukemiao closed 2 years ago

CloudWise-Lukemiao commented 2 years ago

I execute “go run bootstrap” on windows Go report the error in the following picture. What should I do?

env:mage@v1.13.0,go1.17.8 。

image
CloudWise-Lukemiao commented 2 years ago

How should I use it on the window command line? I need an automated script

natefinch commented 2 years ago

It expects that you checked out the code from git, but it looks like you didn't somehow? Did you copy the code from somewhere?

CloudWise-Lukemiao commented 2 years ago

It expects that you checked out the code from git, but it looks like you didn't somehow? Did you copy the code from somewhere?

I use the following command to execute it. It's OK on Linux, but not on windows. The "go mod tidy" command is downloaded from GIT. But I don't know what's wrong。

image

image image
CloudWise-Lukemiao commented 2 years ago

Can you give me some advice

natefinch commented 2 years ago

Installing from inside the pkg directory from someone else's dependencies is not a normal way to install a go application :)

You don't really have to use the bootstrap script. All it does is set some values to tell you what version of mage you're running. You could run go install from that directory and it would work fine... it just wouldn't give you information when you ran mage -version

CloudWise-Lukemiao commented 2 years ago

The problem has been solved. Thank you. I have a new problem/ Can MAGE - V specify the path to compile