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.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/system_command.rb b/Library/Homebrew/cask/lib/hbc/system_command.rb
index aa4b9b295..de544f1b7 100644
--- a/Library/Homebrew/cask/lib/hbc/system_command.rb
+++ b/Library/Homebrew/cask/lib/hbc/system_command.rb
@@ -66,13 +66,13 @@ module Hbc
end
def expanded_command
- @expanded_command ||= command.map { |arg|
+ @expanded_command ||= command.map do |arg|
if arg.respond_to?(:to_path)
File.absolute_path(arg)
else
String(arg)
end
- }
+ end
end
def each_output_line(&b)
@@ -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])