Skip to content

Commit

Permalink
build(readme): run recur.exe on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dbohdan committed Dec 3, 2024
1 parent 1d9add6 commit f67bf48
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion script/render_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"log"
"os"
"os/exec"
"runtime"
"text/template"

"github.com/mitchellh/go-wordwrap"
Expand All @@ -17,7 +18,12 @@ func main() {
log.Fatalf("Failed to read template: %v", err)
}

cmd := exec.Command("./recur", "--help")
command := "./recur"
if runtime.GOOS == "windows" {
command = "recur.exe"
}

cmd := exec.Command(command, "--help")
var cmdOutput bytes.Buffer
cmd.Stdout = &cmdOutput
if err := cmd.Run(); err != nil {
Expand Down

0 comments on commit f67bf48

Please sign in to comment.