Skip to content

Commit

Permalink
Merge pull request #23 from dvdmuckle/switch-esc-fix
Browse files Browse the repository at this point in the history
Fix switch command from panicing when user quits out of fuzzyfind
  • Loading branch information
dvdmuckle authored Jul 18, 2020
2 parents cb05f9e + 008d203 commit 834eae8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ func fuzzySwitchDevice(conf *helper.Config) spotify.ID {
}
})
if err != nil {
if err.Error() == "abort" {
fmt.Println("Aborted switch")
os.Exit(0)
}
glog.Fatal(err)
}
return devices[idx].ID
Expand Down

0 comments on commit 834eae8

Please sign in to comment.