From d6724cf6246b4e004acac2a34f9da339fbf9daab Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Wed, 13 Oct 2021 00:04:49 -0300 Subject: [PATCH] fix: gofish on windows Signed-off-by: Carlos A Becker --- internal/pipe/gofish/food_template.go | 4 ++-- internal/pipe/gofish/gofish_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/pipe/gofish/food_template.go b/internal/pipe/gofish/food_template.go index a3a91e576..410133ed4 100644 --- a/internal/pipe/gofish/food_template.go +++ b/internal/pipe/gofish/food_template.go @@ -37,8 +37,8 @@ food = { resources = { {{- range $binary := $element.Binaries }} { - path = {{if ne $element.OS "windows"}}"{{ $binary }}"{{else}}"{{ $binary }}.exe"{{end}}, - installpath = {{if ne $element.OS "windows"}}"bin/{{ $binary }}"{{else}}"bin\\{{ $binary }}.exe"{{end}}, + path = "{{ $binary }}", + installpath = {{if ne $element.OS "windows"}}"bin/{{ $binary }}"{{else}}"bin\\{{ $binary }}"{{end}}, {{- if ne $element.OS "windows"}} executable = true {{- end }} diff --git a/internal/pipe/gofish/gofish_test.go b/internal/pipe/gofish/gofish_test.go index a4078d5a3..6b9500c13 100644 --- a/internal/pipe/gofish/gofish_test.go +++ b/internal/pipe/gofish/gofish_test.go @@ -65,7 +65,7 @@ func createTemplateData() templateData { OS: "windows", DownloadURL: "https://github.com/caarlos0/test/releases/download/v0.1.3/test_windows_amd64.zip", SHA256: "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67", - Binaries: []string{"bin1", "bin2", "bin3"}, + Binaries: []string{"bin1.exe", "bin2.exe", "bin3.exe"}, }, }, Name: "Test",