diff --git a/argvAutoshell.go b/argvAutoshell.go index 94f4793..76bd21f 100644 --- a/argvAutoshell.go +++ b/argvAutoshell.go @@ -32,7 +32,7 @@ func (args) doBashAuto() { case "pull": fmt.Println("--all --mine --favorites --private") case "patch": - fmt.Println("--list --submit --show") + fmt.Println("list --submit show") case "dirty": fmt.Println("--show-files") case "user": diff --git a/main.go b/main.go index 2153692..41151b0 100644 --- a/main.go +++ b/main.go @@ -178,7 +178,9 @@ func main() { } if argv.Patch.List != nil { - listPatches() + if err := listPatches(); err != nil { + badExit(err) + } okExit("patch list") } } diff --git a/send.go b/send.go index 0b3834c..c296257 100644 --- a/send.go +++ b/send.go @@ -51,6 +51,9 @@ func listPatches() error { last = strings.TrimSpace(line) } parts := strings.Fields(last) + if len(parts) == 0 { + return fmt.Errorf("listPatches() there are no patchsets at this time") + } getPatch(parts[0]) return nil } diff --git a/windowPatches.go b/windowPatches.go index 3902444..d9bfd9e 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -79,7 +79,9 @@ func submitPatchesBox(box *gui.Node) *patchSummary { }) s.grid.NewButton("List Patchsets", func() { - listPatches() + if err := listPatches(); err != nil { + log.Info(err) + } }) s.grid.NewButton("Show Latest Patchset", func() {