Improve style of `conflicts_with` implementation. #159
+11
−6
xu-cheng
commented on the diff
lib/bundle/brew_services.rb
@@ -1,7 +1,7 @@ | ||
module Bundle | ||
class BrewServices | ||
def self.stop(name) | ||
- started = !`brew services list | grep "#{name}" | grep -q "started"`.chomp.empty? | ||
+ started = `brew services list`.lines.grep(/^#{name} +started/).any? |
Can you think of a valid formula name that'd generate invalid regex?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Address @xu-cheng's comments from after #154 was merged.