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

Don't exit each in the no-op case to allow composition #44

Merged
merged 2 commits into from
Mar 21, 2019

Conversation

aengelberg
Copy link
Contributor

lein monolith each currently exits with 0 if the selectors match zero projects. This terminates the leiningen process even if you try to compose each in a high-level task:

$ lein do monolith each :refresh build install, version
Target selection matched zero subprojects; nothing to do

Instead it now "soft-exits" to allow subsequent tasks.

@aengelberg aengelberg requested a review from greglook March 11, 2019 18:16
(ansi/sgr (str/join " " task) :bold :cyan)
(ansi/sgr (count targets) :cyan)
(u/human-duration elapsed)))))))
(do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be cleaner to pull this whole block out as a separate function, now. Looks like the majority of the inputs already get collected as ctx below.

Copy link
Collaborator

@greglook greglook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, you can take the refactor suggestion or not.

@aengelberg aengelberg merged commit da5c70f into develop Mar 21, 2019
@greglook greglook deleted the dont-exit-each branch September 12, 2019 01:11
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

Successfully merging this pull request may close these issues.

2 participants