From 7242638eb774b39b3c0fe0f4d2c24e9138edfd24 Mon Sep 17 00:00:00 2001 From: kitsunyan Date: Sun, 26 Apr 2020 08:28:01 +0300 Subject: Fix reading arguments from stdin --- src/args.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/args.nim b/src/args.nim index ba734c1..c0ea8f4 100644 --- a/src/args.nim +++ b/src/args.nim @@ -23,11 +23,11 @@ type ] iterator readLines(): string = - try: - while true: + while true: + try: yield readLine(stdin) - except: - discard + except: + break iterator splitSingle(valueFull: string, optionsWithParameter: HashSet[OptionKey], next: Option[string]): tuple[key: string, value: Option[string], consumedNext: bool] = -- cgit v1.2.3-70-g09d2