summaryrefslogtreecommitdiff
path: root/shell.go
diff options
context:
space:
mode:
Diffstat (limited to 'shell.go')
-rw-r--r--shell.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/shell.go b/shell.go
index c9ea1ed..15fab39 100644
--- a/shell.go
+++ b/shell.go
@@ -65,6 +65,19 @@ func (repo *Repo) StrictRun(cmd []string) error {
return nil
}
+func (repo *Repo) RunStrictNew(cmd []string) (*cmd.Status, error) {
+ result := repo.RunQuiet(cmd)
+ if result.Error != nil {
+ log.Warn(repo.GetGoPath(), cmd, "wow. golang is cool. an os.Error:", result.Error)
+ return &result, result.Error
+ }
+ if result.Exit != 0 {
+ log.Warn(cmd, "failed with", result.Exit)
+ return &result, errors.New(fmt.Sprint(cmd, "failed with", result.Exit))
+ }
+ return nil, nil
+}
+
func (repo *Repo) Exists(filename string) bool {
if repo == nil {
return false
@@ -121,3 +134,13 @@ func (repo *Repo) RunAll(all [][]string) bool {
}
return true
}
+
+func (repo *Repo) RunStrictAll(all [][]string) (*cmd.Status, error) {
+ for _, cmd := range all {
+ log.Log(GITPBWARN, "doAll() RUNNING: cmd =", cmd)
+ if result, err := repo.RunStrictNew(cmd); err != nil {
+ return result, err
+ }
+ }
+ return nil, nil
+}