Skip to content
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

MSYS2's perl -p detect STDIN as pipe wrongly. It works in MSYS-1.0 (with mintty). #789

Open
johnnytemp opened this issue Jan 17, 2017 · 2 comments

Comments

@johnnytemp
Copy link

johnnytemp commented Jan 17, 2017

Run this in MSYS2 (mintty shell):

perl -e 'print("pipe!") if (-p STDIN)'

Output:

pipe!

Expect to output nothing. STDIN is not a pipe if not piped.

This can break many perl programs... like "ack -f" command -> "ack: No regular expression found." (error)

@mati865
Copy link
Collaborator

mati865 commented Jan 17, 2017

If you use MSYS2 perl (MSYS2 shell) it outputs nothing:

MSYS ~
$ perl -e 'print("pipe!") if (-p STDIN)'

MSYS ~

@johnnytemp
Copy link
Author

johnnytemp commented Feb 17, 2017

My perl is not specific to MSYS2 perl. It is a windows own installation. "which perl" -> path is C:\Perl\bin\perl.exe. My MSYS2 environment doesn't pre-installed perl.

My MSYS2 install file is msys2-i686-20161025.exe. I run MSYS2 from C:\msys32\msys2.exe. And perl version is (installation file ActivePerl-5.18.1.1800-MSWin32-x86-64int-297570.msi):

$ perl --version

This is perl 5, version 18, subversion 1 (v5.18.1) built for MSWin32-x86-multi-thread-64int
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2013, Larry Wall

Binary build 1800 [297570] provided by ActiveState http://www.ActiveState.com
Built Sep 20 2013 11:40:34

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Remark: MSYS-1.0 works with that Windows-native perl gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants