From 704666ba433ae79298023bc2bf8a688dcc98d0b0 Mon Sep 17 00:00:00 2001 From: Aggelos Kolaitis Date: Fri, 17 Apr 2020 02:58:03 +0300 Subject: [PATCH] fix: snap package apps with multiple binaries --- internal/pipe/snapcraft/snapcraft.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/pipe/snapcraft/snapcraft.go b/internal/pipe/snapcraft/snapcraft.go index 6c4a9fe62803..b0bcdc3ddcc4 100644 --- a/internal/pipe/snapcraft/snapcraft.go +++ b/internal/pipe/snapcraft/snapcraft.go @@ -228,12 +228,14 @@ func create(ctx *context.Context, snap config.Snapcraft, arch string, binaries [ // setup the apps: directive for each binary for name, config := range snap.Apps { log.WithField("path", binary.Path). - WithField("name", binary.Name). + WithField("name", name). Debug("passed binary to snapcraft") + // TODO: test that the correct binary is used in Command + // See https://github.com/goreleaser/goreleaser/pull/1449 appMetadata := AppMetadata{ Command: strings.TrimSpace(strings.Join([]string{ - binary.Name, + name, config.Args, }, " ")), Plugs: config.Plugs,