Skip to content

Commit

Permalink
Display message, not error, when pausing non-existent timeslip
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcook committed Nov 9, 2020
1 parent 6cf5e7b commit 76abaaf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ func pauseTimeSlip() (*timeslip.Slip, error) {
return nil, slipError
}

if len(slipJSON) == 0 {
return nil, fmt.Errorf("no timeslip to pause")
}

slip := &timeslip.Slip{}
if err := timeslip.Unmarshal(slipJSON, slip); err != nil {
return nil, err
Expand Down

0 comments on commit 76abaaf

Please sign in to comment.