ipc-system-simple icon indicating copy to clipboard operation
ipc-system-simple copied to clipboard

runx Sometimes Fails to Pass Paths with Spaces In Them on Windows

Open theory opened this issue 7 years ago • 10 comments

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"

theory avatar Jul 14 '17 13:07 theory

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.

autarch avatar Jul 31 '17 16:07 autarch

Would be good, then, if the Windows code properly escaped/quoted args before shelling, to prevent shell interpretation.

theory avatar Jul 31 '17 16:07 theory

Yeah, I agree. I just encountered this issue myself.

autarch avatar Jul 31 '17 16:07 autarch

Is this the same problem as was described in https://rt.cpan.org/Ticket/Display.html?id=52380?

jkeenan avatar Jan 24 '20 16:01 jkeenan

@jkeenan yes, I think so.

autarch avatar Jan 24 '20 16:01 autarch

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

jkeenan avatar Mar 24 '20 01:03 jkeenan

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.

autarch avatar Mar 24 '20 02:03 autarch

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

jkeenan avatar Mar 24 '20 02:03 jkeenan

Ok, I can confirm that this appears to be fixed.

autarch avatar May 01 '20 13:05 autarch

Ok, I can confirm that this appears to be fixed.

Thanks, Dave. Closing.

jkeenan avatar May 01 '20 14:05 jkeenan