ipc-system-simple
ipc-system-simple copied to clipboard
runx Sometimes Fails to Pass Paths with Spaces In Them on Windows
As originally reported in /theory/sqitch#331. Note that the OP, @NorthLarry, found that passing a path with a space to psql
failed, but not when passing it to notepad
. Both work fine on the command-line, of course.
Tests:
perl -MIPC::System::Simple=runx -e "runx @ARGV" psql -f "C:\path\with some spaces/deploy/some_script.sql"
perl -MIPC::System::Simple=runx -e "runx @ARGV" notepad "C:\path\with some spaces/deploy/some_script.sql"
Dupe of #22 and several others, I think.
Basically the docs lie completely about the actual behavior on Windows. It always invokes a shell there, regardless of what sub you call or how you pass your args.
Would be good, then, if the Windows code properly escaped/quoted args before shelling, to prevent shell interpretation.
Yeah, I agree. I just encountered this issue myself.
Is this the same problem as was described in https://rt.cpan.org/Ticket/Display.html?id=52380?
@jkeenan yes, I think so.
I believe that this issue may be resolved in IPC-System-Simple version 1.30, just released to CPAN. Can you confirm?
Thank you very much. Jim Keenan
I wish I remembered what I was doing when I encountered this. But I think it's a fairly simple test. Try to call an executable with a path containing spaces and pass it arguments.
On 3/23/20 10:03 PM, Dave Rolsky wrote:
I wish I remembered what I was doing when I encountered this. But I think it's a fairly simple test. Try to call an executable with a path containing spaces and pass it arguments.
I don't have Windows, so I'm flying blind here and need Windows-users to report results.
Thanks. jimk
Ok, I can confirm that this appears to be fixed.
Ok, I can confirm that this appears to be fixed.
Thanks, Dave. Closing.