aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkitsunyan2020-04-26 05:28:01 +0000
committerkitsunyan2020-04-26 05:28:01 +0000
commit7242638eb774b39b3c0fe0f4d2c24e9138edfd24 (patch)
treeb24c7e272f0dfba72607bc6f5cc506f2178803ca /src
parent138b310de4badfc765151c5d31923ad9167b3a14 (diff)
Fix reading arguments from stdin
Diffstat (limited to 'src')
-rw-r--r--src/args.nim8
1 files changed, 4 insertions, 4 deletions
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] =