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

The --var switch cannot be used as the last switch before the filename #819

Open
alekdavis opened this issue Oct 29, 2024 · 2 comments
Open

Comments

@alekdavis
Copy link

I'm not sure if this is a bug or a feature, but if I specify the --var command-line options, just before the file name, I get the error message complaining about the missing fileName:

image

I suspect this is because it treats the filename as one of the variables. If I move another switch (e.g. -a) before the file name, it works fine. Not a big deal but if this is a feature, maybe need to document it.

@AnWeber
Copy link
Owner

AnWeber commented Oct 29, 2024

I use commander for all cli args parsing. I will test it with a small example and maybe create a issue

@alekdavis
Copy link
Author

I was just helping a coworker and she ran into the same problem when calling CLI as -a -e envname file.http. Basically, it looks like you cannot use any switch that takes multiple arguments before the file name because it then treats the file name as one of the arguments for this switch. Don't know how commander works, but an option would be to have a switch for the file names, like -f file1.http file2.http.

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

2 participants