Skip to content

Commit

Permalink
use the shell luke
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Oct 18, 2024
1 parent 897520f commit 8d93a8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cargo-generate.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[template]
cargo_generate_version = ">=0.10.0"
ignore = [".github", "test.py"]
ignore = [".github", "main.go"]

[placeholders.program_type]
type = "string"
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func run() error {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()

cmd := exec.CommandContext(ctx, "cargo", "xtask", "run")
cmd := exec.CommandContext(ctx, "sh", "-c", "cargo xtask run")
cmd.Dir = projectDir
cmd.Stderr = os.Stderr
// Prevent the child process from being in our process group so that we can send it a SIGINT
Expand All @@ -193,7 +193,7 @@ func run() error {
panic(err)
}
if strings.Contains(text, "Waiting for Ctrl-C") {
syscall.Kill(-cmd.Process.Pid, syscall.SIGINT)
cmd.Process.Signal(os.Interrupt)
}
}
if err := scanner.Err(); err != nil {
Expand Down

0 comments on commit 8d93a8d

Please sign in to comment.