Skip to content

Version string different between go install and using the install.sh script #5069

@systay

Description

@systay

Welcome

  • Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've read the typecheck section of the FAQ.
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
  • I agree to follow this project's Code of Conduct

Description of the problem

Installing golangci-lint using two different methods leads to different results when doing golangci-lint version.
Here is my little script showing the issue:

> curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0                                        1 ↵
golangci/golangci-lint info checking GitHub for tag 'v1.61.0'
golangci/golangci-lint info found version: 1.61.0 for v1.61.0/darwin/arm64
golangci/golangci-lint info installed /Users/systay/.gvm/pkgsets/go1.22.7/global/bin/golangci-lint

> golangci-lint --version                                                                                                            
golangci-lint has version 1.61.0 built with go1.23.1 from a1d6c560 on 2024-09-09T17:44:42Z
> go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint has version v1.61.0 built with go1.22.7 from (unknown, modified: ?, mod sum: "h1:VvbOLaRVWmyxCnUIMTbf1kDsaJbTzH20FAMXTAlQGu8=") on (unknown)

Notice that one returns 1.61.0 and the other returns v1.61.0

Version of golangci-lint

n/a

Configuration

n/a

Go environment

go version go1.23.1 darwin/arm64
GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/systay/Library/Caches/go-build'
GOENV='/Users/systay/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/systay/.gvm/pkgsets/go1.23.1/global/pkg/mod'
GONOPROXY='github.com/planetscale/*'
GONOSUMDB='github.com/planetscale/*'
GOOS='darwin'
GOPATH='/Users/systay/.gvm/pkgsets/go1.23.1/global'
GOPRIVATE='github.com/planetscale/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/systay/.gvm/gos/go1.23.1'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/systay/.gvm/gos/go1.23.1/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.1'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/systay/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/19/j1137q8s6tb3syp_3g6cjqq40000gn/T/go-build2277648204=/tmp/go-build -gno-record-gcc-switches -fno-common'

Verbose output of running

n/a

A minimal reproducible example or link to a public repository

I think my description should be enough

Validation

  • Yes, I've included all information above (version, config, etc.).

Supporter

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: installIssue relates to installation or downloading processquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions