6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-04 19:44:41 +00:00

Fix smaller issues found by various linters

This commit is contained in:
Grzegorz Dlugoszewski
2025-08-24 17:51:14 +02:00
parent b39f5e63fd
commit 2de126166f
5 changed files with 9 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ package run
import (
"bytes"
"context"
"fmt"
"os"
"os/exec"
@@ -32,8 +33,9 @@ type Cmd struct {
// Git creates a git command with given arguments.
func Git(args ...string) *Cmd {
ctx := context.Background()
return &Cmd{
cmd: exec.Command("git", args...),
cmd: exec.CommandContext(ctx, "git", args...),
args: strings.Join(args, " "),
}
}