fix: do not expand variables in output of files()

This commit is contained in:
2025-01-29 00:19:02 +03:00
parent c437346957
commit 52fd4a5a00
3 changed files with 5 additions and 2 deletions

View File

@ -36,6 +36,7 @@ import (
// Импортируем пакеты для поддержки различных форматов пакетов (APK, DEB, RPM и ARCH).
"github.com/google/shlex"
_ "github.com/goreleaser/nfpm/v2/apk"
_ "github.com/goreleaser/nfpm/v2/arch"
_ "github.com/goreleaser/nfpm/v2/deb"
@ -43,7 +44,6 @@ import (
"github.com/leonelquinteros/gotext"
"mvdan.cc/sh/v3/expand"
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/shell"
"mvdan.cc/sh/v3/syntax"
"github.com/goreleaser/nfpm/v2"
@ -537,7 +537,7 @@ func executeFunctions(ctx context.Context, dec *decoder.Decoder, dirs types.Dire
return nil, err
}
contents, err := shell.Fields(buf.String(), func(s string) string { return "" })
contents, err := shlex.Split(buf.String())
if err != nil {
return nil, err
}