Skip to content

Commit

Permalink
Merge pull request #1 from igbanam/upstream-268
Browse files Browse the repository at this point in the history
Guard against no arguments to edit command
  • Loading branch information
igbanam authored May 21, 2023
2 parents 7784c59 + 1565290 commit 011c7fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ func init() {
Long: longDesc,
Short: editCmdDesc,
Run: func(cmd *cobra.Command, args []string) {
if len(args) <= 0 {
fmt.Print("edit needs arguments. See ultralist e[dit] -h.\n")
return
}
todoID, err := strconv.Atoi(args[0])
if err != nil {
fmt.Printf("Could not parse todo ID: '%s'\n", args[0])
Expand Down

0 comments on commit 011c7fe

Please sign in to comment.