Command line parsing fails
Reported by pierre (at baillet) | April 18th, 2011 @ 10:54 AM
If you try to use the command line to specify -b (basedir) to rundeck, it will always ignore your settings because rundeck does not see the option.
After some investigation, it seems that hasOption() of the command line must be called with the SHORT name everytime, or else it reports the option as missing.
Please see the small "test case" at http://www.privatepaste.com/edbe4a6348
java -cp rundeckapp/lib/commons-cli-1.0.jar:. ExpandRunServer --basedir pouet --serverdir honk
--basedir
pouet
--serverdir
honk
Debugging is turned on.
s,serverdir=honk
b,basedir=pouet
serverdir:no
s:yes
basedir:no
b:yes
base dir ispouet
Obviously, the GNU library is not really playing nice with us (should gives the same value for b: and basedir:...).
Suggested fix: use short names everytime if possible :)
Comments and changes to this ticket
-
Greg Schueler April 20th, 2011 @ 02:26 PM
- Milestone set to Rundeck 1.3
-
Deleted User April 27th, 2011 @ 02:51 PM
- State changed from new to resolved
- Milestone order changed from 23 to 0
(from [6d93a9b5e82cfe9f166596b6188838a409f26f93]) Fix use of commons-cli getOptionValue [#256 state:resolved] https://github.com/dtolabs/rundeck/commit/6d93a9b5e82cfe9f166596b61...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues
People watching this ticket
Referenced by
- 256 Command line parsing fails (from [6d93a9b5e82cfe9f166596b6188838a409f26f93]) Fix use...