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
FileNotFoundError attempting to launch sys.executable on Windows #139
Comments
The idea is that ubelt shouldn't be manipulating the inputs unless it needs to. I want to support the ability to execute a command via either a Note that it does build the However, it does look like this is broken on windows. This might simply be a matter of removing the windows check on the line If you could test that patch on your end and verify that it fixes the issue that would be very helpful. I think this is just an oversight on my part because I don't use windows often. |
It looks like the naive fix does break existing tests which submit commands like:
and:
as the command to So it seems like Popen on windows accepts a regular string even when One of my original goals with |
Looking more at this is seems like SO#33560364 is saying on windows Popen can be a str even when shell=False. If that is true then we can just set args to the string and ignore building command_tup if shell=False and it is None on windows. Testing that now. |
In jaraco/safety-tox, I'm attempting to write a script that will wrap tox and tee its output so the output can be inspected after the run and conditionally alter the return code (bypassing failures for missing dependencies).
When I try to use ubelt.cmd to launch the subprocess, however, it fails with this traceback:
It seems that the way ubelt is manipulating the arguments, it doesn't allow the command to execute the way it would naturally.
I try to avoid
shell=True
and always pass a sequence of args for the command as I find that to be the most portable. Forcing a string for the cmd leads to issues like seen above.Is there any way to get the
tee
functionality from ubelt without any other manipulation?The text was updated successfully, but these errors were encountered: