Skip to content

Commit

Permalink
feat: pipe git clone output (#32)
Browse files Browse the repository at this point in the history
Displays git clone command output to user using sesh
  • Loading branch information
tanishqmanuja authored Jan 20, 2024
1 parent 7be8ff1 commit 948a5c8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions git/clone.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package git

import (
"os"
"os/exec"
"regexp"
"strings"
Expand All @@ -26,8 +27,13 @@ func Clone(o CloneOptions) (ClonedRepo, error) {
if o.CmdDir != nil && strings.TrimSpace(*o.CmdDir) != "" {
cmd.Dir = *o.CmdDir
}
_, err := cmd.Output()
cmd.Wait()

cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
cmd.Env = os.Environ()

err := cmd.Run()
if err != nil {
return ClonedRepo{}, err
}
Expand Down

0 comments on commit 948a5c8

Please sign in to comment.