pjf / ipc-system-simple

Perl module to make running system commands and capturing errors as simple as possible.
http://search.cpan.org/perldoc?IPC::System::Simple
Other
19 stars 20 forks source link

Fix windows arguments passing #13

Open wilx opened 10 years ago

wilx commented 10 years ago

See also https://github.com/pjf/ipc-system-simple/issues/10.

shlomif commented 10 years ago

@wilx: on my Windows 7 x86-64 VM with strawberry perl 5.18.2, on your fix-windows-arguments-passing branch (which I converted into a standard Perl distribution using "dzil build" on Linux), then "perl Makefile.PL" ; "dmake" ; "dmake test" stalls at t/04capture.t on 1/12 . Can you look into it?

Regards,

-- Shlomi Fish

schwern commented 8 years ago

The problem was introduced in 1d99f777afccb11a5c735325f78d2034a39e5e0f just before this PR. That might be simpler to debug.

FWIW this works fine on the version of perl that comes with the Windows version of Git. But it doesn't work with Strawberry 5.20.1.

The problem this PR is solving is causing perl5i headaches on Windows.

use IPC::System::Simple 'system';  # or use autodie ':system'
system $^X, '-E', q[say 'Hello']; # doesn't work

system $^X, '-E', q["say 'Hello'"]; # "works", but doesn't work on Unix.