From 93d2163ce9ec51066eede8aa17cdbd3bf9b8ce65 Mon Sep 17 00:00:00 2001 From: mawalu Date: Sat, 16 Oct 2021 13:12:39 +0200 Subject: [PATCH] Fix help output --- lib/args.nim | 5 ++++- main.nim | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/args.nim b/lib/args.nim index 0b9c7b2..3e5df25 100644 --- a/lib/args.nim +++ b/lib/args.nim @@ -38,4 +38,7 @@ proc parseArgs*(): Option[Args] = if command.len > 0: args.cmd = some(command) - return some(args) \ No newline at end of file + if args.name.isSome or args.cmd.isSome or args.profile.isSome: + return some(args) + else: + return none(Args) diff --git a/main.nim b/main.nim index 2bd05ca..b0238c8 100644 --- a/main.nim +++ b/main.nim @@ -5,7 +5,6 @@ import random proc main(): int = let args = parseArgs() - echo args if args.isNone: echo "Usage: bwshell --name=sandbox_name --profile=profile "