help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-gengetopt] override among command line and config file options


From: Papp Gyozo (VBuster)
Subject: Re: [help-gengetopt] override among command line and config file options
Date: Mon, 07 Apr 2008 16:49:37 +0200

> Hi there, 
> 
> I have another problem with no proper solution up to now.
> 
> The basic logic of my app is the following:
> 
> 1) parse commandline (getoptions_ext)
> 2) try to locate a config file (depends on command line options)
> 3) parse configfile with no override and no initialize to the same cmdline
> structure
> 4) check required fields
> 
> We stated in the docs for a while that commandline options take precedence
> over config file. It causes me a little problem at least with group options
> (these are the old mutual exclusive options, Lorenzo ;)
> 
> If an option from a group is given in commandline and in the config file,
> the generatad parser returns an error: 
> 
> "vbscan: 2 options of group ... were given. At most one is required. in
> configuration file vbscan.ini" (*)

Again ... forgot to say that the most annoying situation when the very same 
option is given in both command line and config file. Reporting an error in 
such cases looks a little bit weird for me. 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]