-
Notifications
You must be signed in to change notification settings - Fork 3
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
subprocess.popen throws "File name too long" on Mac #18
Comments
Using the |
I'll have to research that one more. My understanding was that setting shell=True was a potential vulnerability, but don't hold me to that. |
It looks like it can open security vulnerabilities, so I'd rather not introduce that. Is it possible to move the default directory to a higher level directory? When I write out to %USERPROFILE% (the default) in Windows, it doesn't seem to have a problem. |
There's an alternative syntax that relies on using a list of strings that
I've used in the past without the shell option, but I don't remember the
details without reading for a while.
…On Fri, Apr 3, 2020, 1:30 PM Mike ***@***.***> wrote:
It looks like it can open security vulnerabilities, so I'd rather not
introduce that. Is it possible to move the default directory to a higher
level directory? When I write out to %USERPROFILE% (the default) in
Windows, it doesn't seem to have a problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#18 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACIJZETMLTXMXSVJRYRBNLRKYTMXANCNFSM4L4J2Q2Q>
.
|
If I pass a longer query through, I get an
OSError: [Errno 63] File name too long: <redacted bcp command>
. Adding ashell=True
tosubprocess.run
fixes things, but I don't recall all the details ofsubprocess
to remember if this is a general solution.The text was updated successfully, but these errors were encountered: