Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readRequiredOption should not throw if --help option passed #803

Merged
merged 1 commit into from
Sep 18, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/vibe/core/args.d
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ T readRequiredOption(T)(string names, string help_text)
return names.split("|").map!(s => s.length == 1 ? "-" ~ s : "--" ~ s).join("/");
}
T ret;
enforce(readOption(names, &ret, help_text),
enforce(readOption(names, &ret, help_text) || g_help,
format("Missing mandatory option %s.", formattedNames()));
return ret;
}
Expand Down Expand Up @@ -199,7 +199,7 @@ private void init()
{
version (VibeDisableCommandLineParsing) {}
else g_args = Runtime.args;

if (!g_args.length) g_args = ["dummy"];

// TODO: let different config files override individual fields
Expand Down