diff --git a/internal/lefthook/runner/exec/execute_unix.go b/internal/lefthook/runner/exec/execute_unix.go index 1a547563..ccaa9a9b 100644 --- a/internal/lefthook/runner/exec/execute_unix.go +++ b/internal/lefthook/runner/exec/execute_unix.go @@ -68,16 +68,6 @@ func (e CommandExecutor) Execute(ctx context.Context, opts Options, in io.Reader return nil } -// func (e CommandExecutor) RawExecute(ctx context.Context, command []string, in io.Reader, out io.Writer) error { -// cmd := exec.CommandContext(ctx, command[0], command[1:]...) - -// cmd.Stdin = in -// cmd.Stdout = out -// cmd.Stderr = os.Stderr - -// return cmd.Run() -// } - func (e CommandExecutor) execute(ctx context.Context, cmdstr string, args *executeArgs) error { command := exec.CommandContext(ctx, "sh", "-c", cmdstr) command.Dir = args.root diff --git a/internal/lefthook/runner/exec/execute_windows.go b/internal/lefthook/runner/exec/execute_windows.go index de91e435..47d6bc1c 100644 --- a/internal/lefthook/runner/exec/execute_windows.go +++ b/internal/lefthook/runner/exec/execute_windows.go @@ -59,16 +59,6 @@ func (e CommandExecutor) Execute(ctx context.Context, opts Options, in io.Reader return nil } -// func (e CommandExecutor) RawExecute(ctx context.Context, command []string, in io.Reader, out io.Writer) error { -// cmd := exec.CommandContext(ctx, command[0], command[1:]...) - -// cmd.Stdin = in -// cmd.Stdout = out -// cmd.Stderr = os.Stderr - -// return cmd.Run() -// } - func (e CommandExecutor) execute(cmdstr string, args *executeArgs) error { cmdargs := strings.Split(cmdstr, " ") command := exec.Command(cmdargs[0]) diff --git a/internal/lefthook/runner/exec/executor.go b/internal/lefthook/runner/exec/executor.go index e6aa337c..520536ad 100644 --- a/internal/lefthook/runner/exec/executor.go +++ b/internal/lefthook/runner/exec/executor.go @@ -16,5 +16,5 @@ type Options struct { // Executor provides an interface for command execution. // It is used here for testing purpose mostly. type Executor interface { - Execute(ctx context.Context, opts Options, in io.Reader, out io.Writer) error + Execute(context.Context, Options, io.Reader, io.Writer) error }