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

yarn run command with parentheses and pipe giving error #6236

Open
1 task
ebo-trelly opened this issue Apr 17, 2024 · 0 comments
Open
1 task

yarn run command with parentheses and pipe giving error #6236

ebo-trelly opened this issue Apr 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ebo-trelly
Copy link

ebo-trelly commented Apr 17, 2024

Self-service

  • I'd be willing to implement a fix

Describe the bug

I have an example script (echo 123) | grep 123 in my package.json's scripts and when I run yarn run example, I do get '123' in terminal but the exit code from echo $? is 1 and I'm not sure why, could be a bug?

To reproduce

Package.json

{
  "scripts": {
    "example": "(echo 123) | grep 123"
  }
}

Run yarn run example

Environment

System:
    OS: macOS 14.3.1
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Binaries:
    Node: 20.9.0 - /private/var/folders/ls/4h4kh3zx5pn5v09t5gp8xhl40000gn/T/xfs-0fa3b005/node
    Yarn: 4.0.1 - /private/var/folders/ls/4h4kh3zx5pn5v09t5gp8xhl40000gn/T/xfs-0fa3b005/yarn
    npm: 10.1.0 - /usr/local/bin/npm
  npmPackages:
    jest: ^29.7.0 => 29.7.0

Additional context

No response

@ebo-trelly ebo-trelly added the bug Something isn't working label Apr 17, 2024
@ebo-trelly ebo-trelly changed the title yarn run with parentheses and pipe not working as expected yarn run command with parentheses and pipe giving error Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant