summaryrefslogtreecommitdiff
path: root/shell.go
diff options
context:
space:
mode:
Diffstat (limited to 'shell.go')
-rw-r--r--shell.go17
1 files changed, 12 insertions, 5 deletions
diff --git a/shell.go b/shell.go
index ca9d6b1..4098303 100644
--- a/shell.go
+++ b/shell.go
@@ -25,11 +25,18 @@ func (repo *Repo) Run(cmd []string) cmd.Status {
func (repo *Repo) RunQuiet(cmd []string) cmd.Status {
result := shell.PathRunQuiet(repo.FullPath, cmd)
- output := strings.Join(result.Stdout, "\n")
- if result.Error != nil {
- log.Warn("cmd:", cmd)
- log.Warn("ouptput:", output)
- log.Warn("failed with error:", result.Error)
+ return result
+}
+
+func (repo *Repo) RunEcho(cmd []string) cmd.Status {
+ result := shell.PathRunQuiet(repo.FullPath, cmd)
+ log.Info("cmd:", repo.FullPath, cmd)
+ log.Warn("cmd.Exit:", result.Exit, "cmd.Error:", result.Error)
+ for _, line := range result.Stdout {
+ log.Info("STDOUT:", line)
+ }
+ for _, line := range result.Stderr {
+ log.Info("STDERR:", line)
}
return result
}