Skip to content

Commit

Permalink
Give command line precedence over configuration file. See #331.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Oct 3, 2013
1 parent 5b661d5 commit 17d4a9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/vibe/core/args.d
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ bool getOption(T)(string names, T* pvalue, string help_text)

immutable olen = g_args.length;
getopt(g_args, getoptConfig, names, pvalue);
immutable found = olen > g_args.length;
if (g_args.length < olen) return true;

if (g_haveConfig) {
foreach (name; info.names)
if (auto pv = name in g_config) {
*pvalue = pv.to!T;
break;
return true;
}
}

return found;
return false;
}


Expand Down

0 comments on commit 17d4a9d

Please sign in to comment.