The script check_go_path, which located at bin/check_go_path, seems odd to me.
When i first tried make install, i get the error:
“go-ipfs must be built from within your $GOPATH directory.”
"expected within “MyGOPATH” but got “$(pwd)”
I fixed it by changing the my bash’s GOPATH which was originally
Where i change the script file’s (check_go_path) code, ( I set my GOPATH var to be up 4 directories)
GOPATH="$(go env GOPATH)" to
export GOPATH="$(realpath ../../../../)"
so that the build will occur within my GOPATH, and then there was no error building the ipfs binary file.
The original code works well for linux users, but not for windows users who rely on msys2 (or is it just me) and have altered their default GOPATH.
one question, why still check for GOOS while there’s a shebang at the top of the build file, stating that it is going to use bash to run the script, which means the GOOS would follow the bash’s GOOS which is linux, or am i getting all these things wrong? All your answers are deeply appreciated. Thank you for your attention, and sry for my english.