Don't swallow control-C (#588)

* Don't swallow control-C

* Raise NimbleError instead of quitting

* Import NimbleError from common rather than version
This commit is contained in:
Matt Haggard 2018-11-29 18:08:02 -07:00 committed by Dominik Picheta
commit ba6577d36c

View file

@ -13,6 +13,7 @@
# - Normal for MediumPriority.
import logging, terminal, sets, strutils, os
import ./common
when defined(windows):
import winlean
@ -218,6 +219,9 @@ proc promptListInteractive(question: string, args: openarray[string]): string =
of '\r':
selected = true
break
of '\3':
showCursor(stdout)
raise newException(NimbleError, "Keyboard interrupt")
else: discard
# Erase all lines of the selection