From 9f30d5b1f8f2aef7a5f583014f959cebbef724d6 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sat, 30 Oct 2021 19:16:36 +0200 Subject: [PATCH] [fix] morty & filtron: don't use golang installed by package manager When golang is installed via a package manager the local version, which filtron downloads, is ignored. BTW: With the new go1.17.2 (cfea51f4), 'go get' is depricated:: go get: installing executables with 'go get' in module mode is deprecated. Use 'go install pkg@version' instead. For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'. Reported-by: @tiekoetter https://github.com/searxng/searxng/pull/455#issuecomment-954918411 Signed-off-by: Markus Heiser --- utils/filtron.sh | 6 +++--- utils/morty.sh | 16 +++------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/utils/filtron.sh b/utils/filtron.sh index fa661ab8b..4e8d6aa5d 100755 --- a/utils/filtron.sh +++ b/utils/filtron.sh @@ -340,7 +340,7 @@ EOF cat > "$GO_ENV" <&1 | prefix_stdout "$_svcpr" -go get -v -u github.com/asciimoo/filtron +go install -v github.com/asciimoo/filtron@latest EOF } @@ -367,7 +367,7 @@ update_filtron() { rst_title "Update filtron" section echo tee_stderr <&1 | prefix_stdout "$_svcpr" -go get -v -u github.com/asciimoo/filtron +go install -v github.com/asciimoo/filtron@latest EOF } diff --git a/utils/morty.sh b/utils/morty.sh index e1481016f..c04df7a0c 100755 --- a/utils/morty.sh +++ b/utils/morty.sh @@ -340,7 +340,7 @@ EOF cat > "$GO_ENV" <&1 | prefix_stdout "$_svcpr" -go get -v -u github.com/asciimoo/morty -EOF - tee_stderr <&1 | prefix_stdout "$_svcpr" -cd \$GOPATH/src/github.com/asciimoo/morty -go test -go test -benchmem -bench . +go install -v github.com/asciimoo/morty@latest EOF } @@ -372,12 +367,7 @@ update_morty() { rst_title "Update morty" section echo tee_stderr <&1 | prefix_stdout "$_svcpr" -go get -v -u github.com/asciimoo/morty -EOF - tee_stderr <&1 | prefix_stdout "$_svcpr" -cd \$GOPATH/src/github.com/asciimoo/morty -go test -go test -benchmem -bench . +go install -v github.com/asciimoo/morty@latest EOF }