-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Update migration needed #432
Update migration needed #432
Conversation
!dir.subdirs.empty? && tap == Tab.for_keg(dir.subdirs.first).tap | ||
return false unless oldname | ||
return false if rack.exist? | ||
return false unless (dir = HOMEBREW_CELLAR/oldname).directory? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to split the dir =
out onto the previous line
👍 other than a few tweaks |
35b6141
to
126d7fa
Compare
old_cellar_dir = HOMEBREW_CELLAR/oldname | ||
|
||
return false unless old_cellar_dir.directory? | ||
return false if old_cellar_dir.subdirs.empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a tiny detail, but I think since this and the line above reference old_cellar_dir
in their condition, it would be more logical to group them with the old_cellar_dir =
line than with the line below, i.e. that's how I would expect the empty lines to be distributed:
return false unless oldname
return false if rack.exist?
old_cellar_dir = HOMEBREW_CELLAR/oldname
return false unless old_cellar_dir.directory?
return false if old_cellar_dir.subdirs.empty?
tap == Tab.for_keg(old_cellar_dir.subdirs.first).tap
Does that make sense?
Two minor comments regarding distribution of empty lines and terminology, but otherwise 👍. |
126d7fa
to
de576ed
Compare
LGTM 👍 |
I agree, hence the merge. The method is now much more readable. 👍 Merged in fbac41d. Thank you for another contribution to Homebrew, @vladshablinsky! 🎉 |
Closes Homebrew#432. Signed-off-by: Martin Afanasjew <[email protected]>
brew tests
with your changes locally?Description
Return false for each of those cases rather than chaining with && since It makes it much easier to follow.
#411 (comment)
cc @MikeMcQuaid