mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-18 03:56:52 +02:00
fix: not a go module on go 1.15
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
parent
008bd866a9
commit
90f2ba6925
@ -16,6 +16,11 @@ func (Pipe) String() string {
|
||||
return "loading go mod information"
|
||||
}
|
||||
|
||||
const (
|
||||
go115NotAGoModuleError = "go list -m: not using modules"
|
||||
go116NotAGoModuleError = "command-line-arguments"
|
||||
)
|
||||
|
||||
// Run the pipe.
|
||||
func (Pipe) Run(ctx *context.Context) error {
|
||||
out, err := exec.CommandContext(ctx, "go", "list", "-m").CombinedOutput()
|
||||
@ -24,7 +29,7 @@ func (Pipe) Run(ctx *context.Context) error {
|
||||
}
|
||||
|
||||
result := strings.TrimSpace(string(out))
|
||||
if result == "command-line-arguments" {
|
||||
if result == go115NotAGoModuleError || result == go116NotAGoModuleError {
|
||||
return pipe.Skip("not a go module")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user