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

Always exits 0 in monorepo #499

Closed
saiichihashimoto opened this issue Aug 15, 2024 · 2 comments
Closed

Always exits 0 in monorepo #499

saiichihashimoto opened this issue Aug 15, 2024 · 2 comments

Comments

@saiichihashimoto
Copy link

saiichihashimoto commented Aug 15, 2024

When running concurrently from a monorepo workspace, all commands exit 0.

From the root, things are fine:

package.json:

...
    "explicitfail": "concurrently npm:explicitfail:*",
    "explicitfail:fail": "exit 1",
...

Command:

npm run explicitfail && echo shouldnt show

Output:

> explicitfail
> concurrently npm:explicitfail:*

[fail] 
[fail] > explicitfail:fail
[fail] > exit 1
[fail] 
[fail] npm run explicitfail:fail exited with code 1

However, when I cd into packages/subpackage and have the same setup, it succeeds:

packages/subpackage/package.json: (same thing)

...
    "explicitfail": "concurrently npm:explicitfail:*",
    "explicitfail:fail": "exit 1",
...

Command:

npm run explicitfail && echo shouldnt show

Output:

> @monorepo/[email protected] explicitfail
> concurrently npm:explicitfail:*

[fail] 
[fail] > @monorepo/[email protected] explicitfail:fail
[fail] > exit 1
[fail] 
[fail] npm ERR! Lifecycle script `explicitfail:fail` failed with error: 
[fail] npm ERR! Error: command failed 
npm ERR!   in workspace: @monorepo/[email protected] 
npm ERR!   at location: /path/to/repo/monorepo/packages/subpackage 
[fail] npm run explicitfail:fail exited with code 0
shouldnt show
@saiichihashimoto saiichihashimoto changed the title Always exit 0 in monorepo Always exits 0 in monorepo Aug 15, 2024
@gustavohenke
Copy link
Member

Interesting. Are you able to share a self-contained example repository?

@saiichihashimoto
Copy link
Author

I believe this was related to a turbo issue, so I think we're good here

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

No branches or pull requests

2 participants