From eccdc4c2533c0a38a6a3922698c60e30d0286d14 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" <13498015+amyspark@users.noreply.github.com> Date: Thu, 3 Oct 2019 20:21:32 +0000 Subject: [PATCH] Cask: address @reitermarkus's comments --- Library/Homebrew/cask/cmd/doctor.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cask/cmd/doctor.rb b/Library/Homebrew/cask/cmd/doctor.rb index 48d432453d..8f54d6593d 100644 --- a/Library/Homebrew/cask/cmd/doctor.rb +++ b/Library/Homebrew/cask/cmd/doctor.rb @@ -128,17 +128,17 @@ module Cask if result.status.success? puts none_string - elsif result.stderr.match? "ImportError: No module named pkg_resources" + elsif result.stderr.include? "ImportError: No module named pkg_resources" result = system_command "/usr/bin/python", "--version" - if result.stdout.match? "Python 2.7" + if result.stdout.include? "Python 2.7" add_error "Your Python installation has a broken version of setuptools." add_error "To fix, reinstall macOS or run 'sudo /usr/bin/python -m pip install -I setuptools'." else add_error "The system Python version is wrong." add_error "To fix, run 'defaults write com.apple.versioner.python Version 2.7'." end - elsif result.stderr.match? "pkg_resources.DistributionNotFound" + elsif result.stderr.include? "pkg_resources.DistributionNotFound" add_error "Your Python installation is unable to find xattr." else add_error "unknown xattr error: #{result.stderr.first}"