-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
posargs fails when providing arguments with spaces in quotes #310
Comments
Original comment by @blueyed I totally agree, and mentioned even the same xkcd comic in this context.. :) |
Original comment by @sigmavirus24 @blueyed yeah the typical workflow dilemma. Anyway, I described that hack around it above and have been just avoiding it by not using tox + posargs when necessary. I think that points to it needing to be fixed because I don't care to have to do the extra work to make tox do the right thing. I'm leaving the issue open anyway. At the very least tox should document this as a known quantity so others don't have to spend 30 minutes experimenting/debugging to find the right way to make this work. |
Original comment by @blueyed You can use It will still say the following (without quotes) though, but work:
(According to @The-Compiler it might not get fixed, because people might be used to this workaround already?!) |
Original comment by glouie I have similar problems as well and would like to know how to pass arguments with spaces or even able to pass in single or double quotes I"m trying to run tox and pass arguments down to py.test.
Usage:
instead of running
it runs
|
As I'm transitioning my projects from pytest-runner to tox, I encountered this issue today:
I verified that the proposed workaround does work.
ugh. That's not right. I'd really like to see a proper fix for this issue... and if absolutely necessary, include an option to retain the broken behavior for those who really must rely on it. |
I agree it's not a good situation and we should see to fix it. I am not sure if we have to care very much wrt to backward-compat but it's probably nice if we do. |
I've created a fix for this issue, please review #385 I am not sure how much of a backward-incompatibility this really is. We could do a tox-2.5 to indicate to people that they should pay a bit more attention instead of just a "micro" 2.4.2 release. What do you think? My current view is that this only changes how you invoke tox on the command line and relatively few people will have gotten to the work around (double-quoting) and rely on it from automated scripts. Agree, disagree? |
I agree that relatively few will have gotten around to using the workaround in a formal way. I've adopted that technique in just two of our Jenkins scripts, which non-interactively invoke |
I did figure out that I could indeed rely on tox.ini for passing the
|
fixed in 53f6149 |
An example tox.ini
And the usage
In both cases
%(text)s
is not passed as part of the argument to--format
but instead is passed as an argument as if the user did insteadNo amount of escaping (either of the space or the quotes) works. What does work, however, is:
In other words, using both types of quotes works.
I looked but didn't see this reported anywhere else and I'm frankly not certain this is something that can be fixed.
The text was updated successfully, but these errors were encountered: