newCmd initializes an exec.Cmd that sends SIGINT instead of SIGKILL when the ctx is canceled.
(ctx context.Context, name string, args ...string)
| 822 | |
| 823 | // newCmd initializes an exec.Cmd that sends SIGINT instead of SIGKILL when the ctx is canceled. |
| 824 | func newCmd(ctx context.Context, name string, args ...string) *exec.Cmd { |
| 825 | cmd := exec.CommandContext(ctx, name, args...) |
| 826 | cmd.Cancel = func() error { |
| 827 | return cmd.Process.Signal(os.Interrupt) |
| 828 | } |
| 829 | return cmd |
| 830 | } |
| 831 | |
| 832 | // lookupDotenv returns a value from the .env file. |
| 833 | // NOTE: Not using godotenv.Load() since the OpenTelemetry-related env vars clash with `docker compose`. |
no outgoing calls
no test coverage detected