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:
@@ -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, " "),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user