Skip to content

Pipe not Working #13662

@adam-grant-hendry

Description

@adam-grant-hendry

Description

First discovered in MinGW bug report #2303, pipes seem to fail in certain circumstances in the bash that ships with Git for Windows:

Example 1

$ x=$(echo a | grep a)
$ echo a=$x

Expected Output: a=a
Actual Output: a=

error_01.mp4

Example 2

For reference, please see commitizen PR #605

$ poetry run python -m pydocstyle --convention=google --add-ignore=D1,D415 --match-dir='^(?![.]|venv).*'

Expected Output: Runs and passes (no output)
Actual Output: 'venv).*' is not recognized as an internal or external command, operable program or batch file.

$ poetry run python -m pydocstyle --convention=google --add-ignore=D1,D415 --match-dir="^(?![.]|venv).*"

Expected Output: Runs and passes (no output)
Actual Output: bash: ![.]: event not found

error_02.mp4

Verification

Windows Version

OS: determined with cmd.exe /c ver

Microsoft Windows [Version 10.0.19044.2006]

Git: determined with git --version

git version 2.36.1.windows.1

Bash: determined with uname:

kernel-name: MINGW64_NT-10.0-19044
kernel-release: 3.3.4-341.x86_64
kernel-version: 2022-05-09 11:56 UTC
machine: x86-64
operating-system: Msys

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANG32
  • CLANGARM64

Expected behavior

Please see details in Description.

Actual behavior

Please see details in Description.

Repro steps

Please see details in Description.

Are you willing to submit a PR?

If I know how to fix it, yes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions