[install] Replace go get with go install

Fix #3365
This commit is contained in:
Junegunn Choi 2023-08-26 20:00:16 +09:00
parent 3a965856a5
commit 5f66786ef1
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 2 additions and 2 deletions

View File

@ -196,12 +196,12 @@ if [ -n "$binary_error" ]; then
echo " - $binary_error !!!"
fi
if command -v go > /dev/null; then
echo -n "Building binary (go get -u github.com/junegunn/fzf) ... "
echo -n "Building binary (go install github.com/junegunn/fzf) ... "
if [ -z "${GOPATH-}" ]; then
export GOPATH="${TMPDIR:-/tmp}/fzf-gopath"
mkdir -p "$GOPATH"
fi
if go get -ldflags "-s -w -X main.version=$version -X main.revision=go-get" github.com/junegunn/fzf; then
if go install -ldflags "-s -w -X main.version=$version -X main.revision=go-install" github.com/junegunn/fzf; then
echo "OK"
cp "$GOPATH/bin/fzf" "$fzf_base/bin/"
else