diff options
Diffstat (limited to 'doDebian.go')
| -rw-r--r-- | doDebian.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/doDebian.go b/doDebian.go index c447dba..339fe7d 100644 --- a/doDebian.go +++ b/doDebian.go @@ -14,18 +14,19 @@ import ( "go.wit.com/log" ) -func doDebian() { +func doDebian() error { // clean out old deb files globPattern := filepath.Join(me.homedir, "incoming", "*.deb") files, err := filepath.Glob(globPattern) if err != nil { log.Info("Error during globbing:", err) - badExit(err) + return err } if len(files) > 0 { cmd := []string{"rm"} cmd = append(cmd, files...) - exitOnErrorRealtime(cmd) + _, err := shell.RunRealtimeError(cmd) + return err } initForge() @@ -59,7 +60,7 @@ func doDebian() { } dur := stat.End.Sub(stat.Start) log.Info("CRAP. INSTALL FAILED", shell.FormatDuration(dur), s, stat.Err) - badExit(stat.Err) + return stat.Err } } @@ -69,14 +70,15 @@ func doDebian() { for s, stat := range stats { if stat.Err != nil { log.Info("ERROR WITH buildDeb", s, stat.Err) - badExit(stat.Err) + return stat.Err } } if argv.DryRun { - return + return nil } - exitOnErrorRealtime([]string{"do-aptly"}) + _, err = shell.RunRealtimeError([]string{"do-aptly"}) + return err } func getStatusEnd(repo *gitpb.Repo) string { |
