You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-11-06 09:09:29 +02:00
fix: update strings when using a custom distribution directory (#2689)
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
This commit is contained in:
committed by
GitHub
parent
808b603506
commit
ff0fdf3520
8
internal/pipe/dist/dist.go
vendored
8
internal/pipe/dist/dist.go
vendored
@@ -14,14 +14,14 @@ import (
|
||||
type Pipe struct{}
|
||||
|
||||
func (Pipe) String() string {
|
||||
return "checking ./dist"
|
||||
return "checking distribution directory"
|
||||
}
|
||||
|
||||
// Run the pipe.
|
||||
func (Pipe) Run(ctx *context.Context) (err error) {
|
||||
_, err = os.Stat(ctx.Config.Dist)
|
||||
if os.IsNotExist(err) {
|
||||
log.Debug("./dist doesn't exist, creating empty folder")
|
||||
log.Debugf("%s doesn't exist, creating empty folder", ctx.Config.Dist)
|
||||
return mkdir(ctx)
|
||||
}
|
||||
if ctx.RmDist {
|
||||
@@ -37,13 +37,13 @@ func (Pipe) Run(ctx *context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
if len(files) != 0 {
|
||||
log.Debugf("there are %d files on ./dist", len(files))
|
||||
log.Debugf("there are %d files on %s", len(files), ctx.Config.Dist)
|
||||
return fmt.Errorf(
|
||||
"%s is not empty, remove it before running goreleaser or use the --rm-dist flag",
|
||||
ctx.Config.Dist,
|
||||
)
|
||||
}
|
||||
log.Debug("./dist is empty")
|
||||
log.Debugf("%s is empty", ctx.Config.Dist)
|
||||
return mkdir(ctx)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user