mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
using strings.Fields instead of strings.Split on space
This commit is contained in:
parent
eaaf816e59
commit
103cbb2996
@ -44,7 +44,7 @@ func build(name, goos, goarch string, ctx *context.Context) error {
|
||||
output := "dist/" + name + "/" + ctx.Config.Build.BinaryName + extFor(goos)
|
||||
log.Println("Building", output)
|
||||
if ctx.Config.Build.Hooks.Pre != "" {
|
||||
cmd := strings.Split(ctx.Config.Build.Hooks.Pre, " ")
|
||||
cmd := strings.Fields(ctx.Config.Build.Hooks.Pre)
|
||||
if err := run(goos, goarch, cmd); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -54,7 +54,7 @@ func build(name, goos, goarch string, ctx *context.Context) error {
|
||||
return err
|
||||
}
|
||||
if ctx.Config.Build.Hooks.Post != "" {
|
||||
cmd := strings.Split(ctx.Config.Build.Hooks.Post, " ")
|
||||
cmd := strings.Fields(ctx.Config.Build.Hooks.Post)
|
||||
if err := run(goos, goarch, cmd); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user