-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
lerna run: Don't error if no scoped packages are matched #859
Comments
evocateur
changed the title
Don't error if no scoped packages are matched
run/exec: Don't error if no scoped packages are matched
Jun 6, 2017
evocateur
changed the title
run/exec: Don't error if no scoped packages are matched
lerna run: Don't error if no scoped packages are matched
Jun 6, 2017
The inconsistency between scoped |
ricky
added a commit
to ricky/lerna
that referenced
this issue
Jun 7, 2017
9 tasks
This was fixed waaaay back in v2.0.0 🤸♀️ |
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm implementing #822 and have been attempting to integrate it into our workflow. However, I'm running into some issues where I want to scope some commands using that flag (
--since
) but don't want it to error if no packages are run.In thinking about this, I'm not sure it's valuable to ever exit with non-zero if no scoped packages are matched; it doesn't seem like an exceptional state. Warning might be fine, but even then, it's fairly clear when no packages are matched.
Expected Behavior
I would expect to be able to run
lerna run something --scope some-unmatched-package
without errors.This is also inconsistent with how scoping is applied to built-in Lerna commands as well as
exec
. For example,bootstrap
andls
don't error if a filtering option doesn't match any packages, it just logs that it didn't run in any packages.Current Behavior
The command errors. This means you can't do something like
lerna run eslint --since this-branch
to only lint against changed files, it will fail linting if no packages have been changed.To work around this you can do something like
lerna exec --since ref -- eslint
.Possible Solution
The built-in commands log how many packages a command was run in, so maybe we can follow suit here for
run
.Steps to Reproduce (for bugs)
n/a
Context
This seems only an issue for
lerna run
, so to work around it you could useexec
, but it feels odd to have to do something likelerna exec --scope package -- npm run test
.Your Environment
n/a
The text was updated successfully, but these errors were encountered: