aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/system_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/system_command.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/system_command.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/system_command.rb b/Library/Homebrew/cask/lib/hbc/system_command.rb
index aa4b9b295..41fa924f9 100644
--- a/Library/Homebrew/cask/lib/hbc/system_command.rb
+++ b/Library/Homebrew/cask/lib/hbc/system_command.rb
@@ -144,7 +144,7 @@ module Hbc
end
def self._warn_plist_garbage(command, garbage)
- return true unless garbage =~ %r{\S}
+ return true unless garbage =~ /\S/
external = File.basename(command.first)
lines = garbage.strip.split("\n")
opoo "Non-XML stdout from #{external}:"
@@ -152,8 +152,8 @@ module Hbc
end
def self._parse_plist(command, output)
- raise CaskError, "Empty plist input" unless output =~ %r{\S}
- output.sub!(%r{\A(.*?)(<\?\s*xml)}m, '\2')
+ raise CaskError, "Empty plist input" unless output =~ /\S/
+ output.sub!(/\A(.*?)(<\?\s*xml)/m, '\2')
_warn_plist_garbage(command, Regexp.last_match[1]) if Hbc.debug
output.sub!(%r{(<\s*/\s*plist\s*>)(.*?)\Z}m, '\1')
_warn_plist_garbage(command, Regexp.last_match[2])