diff --git a/go.mod b/go.mod index f99595f..85174ee 100644 --- a/go.mod +++ b/go.mod @@ -73,6 +73,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/rpmpack v0.6.1-0.20240329070804-c2247cbb881a // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.4.0 // indirect github.com/goreleaser/chglog v0.6.1 // indirect github.com/goreleaser/fileglob v1.3.0 // indirect diff --git a/go.sum b/go.sum index bff8573..9ab216d 100644 --- a/go.sum +++ b/go.sum @@ -196,6 +196,8 @@ github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S3 github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/rpmpack v0.6.1-0.20240329070804-c2247cbb881a h1:JJBdjSfqSy3mnDT0940ASQFghwcZ4y4cb6ttjAoXqwE= github.com/google/rpmpack v0.6.1-0.20240329070804-c2247cbb881a/go.mod h1:uqVAUVQLq8UY2hCDfmJ/+rtO3aw7qyhc90rCVEabEfI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= diff --git a/pkg/build/build.go b/pkg/build/build.go index 20f239c..d2ea054 100644 --- a/pkg/build/build.go +++ b/pkg/build/build.go @@ -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 }