diff --git a/contrib/devtools/proto-tools-installer.sh b/contrib/devtools/proto-tools-installer.sh index db2bdd64d838..fd287ddd8db3 100755 --- a/contrib/devtools/proto-tools-installer.sh +++ b/contrib/devtools/proto-tools-installer.sh @@ -85,9 +85,13 @@ f_install_buf() { f_install_protoc_gen_gocosmos() { f_print_installing_with_padding protoc-gen-gocosmos - pushd "${TEMPDIR}" >/dev/null + + if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then + echo -e "\tPlease run this command from somewhere inside the cosmos-sdk folder." + return 1 + fi + go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null - popd >/dev/null f_print_done }