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

More than one space between parameters #455

Open
costin3141 opened this issue Sep 13, 2018 · 0 comments
Open

More than one space between parameters #455

costin3141 opened this issue Sep 13, 2018 · 0 comments

Comments

@costin3141
Copy link

I am using jcommander to parse a command line and have an issue when the comand line looks like this:
myprogramm -x -z

Note that between -x and -y are two spaces (not sure but could be that it needs 3 spaces).
JCommander throws the following error:
"Was passed main parameter '' but no main parameter was defined in your arg class"

So JCommander treats one of the spaces as a parameter. How can i make JCommander to allow arbtriary many spaces between parameters.
This is needed because the command is summond from a jenkins server adding parameters to it which might be empty: myprogramm $X $Y $Z
So if i.e. $Y is empty i run into the mentioned issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant