1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-18 03:56:52 +02:00

fix: nfpm on windows (#2099)

This commit is contained in:
Gastón Palomeque 2021-03-09 18:16:54 -03:00 committed by GitHub
parent c9ffa78c25
commit 2d3ec15bc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -196,8 +196,8 @@ func create(ctx *context.Context, fpm config.NFPM, format, arch string, binaries
dst := filepath.Join(fpm.Bindir, binary.Name)
log.WithField("src", src).WithField("dst", dst).Debug("adding binary to package")
contents = append(contents, &files.Content{
Source: src,
Destination: dst,
Source: filepath.ToSlash(src),
Destination: filepath.ToSlash(dst),
})
}
}

View File

@ -808,10 +808,14 @@ func TestSkipSign(t *testing.T) {
}
t.Run("skip sign not set", func(t *testing.T) {
contains := "open /does/not/exist.gpg: no such file or directory"
if runtime.GOOS == "windows" {
contains = "open /does/not/exist.gpg: The system cannot find the path specified."
}
require.Contains(
t,
Pipe{}.Run(ctx).Error(),
`open /does/not/exist.gpg: no such file or directory`,
contains,
)
})