Skip to content

Commit

Permalink
Merge branch 'ohai-150' of git://github.com/mdkent/ohai into mdkent/o…
Browse files Browse the repository at this point in the history
…hai-150
  • Loading branch information
adamhjk committed Jan 28, 2010
2 parents 08bb50a + 4d5a6ed commit 3502430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ohai/system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def set(name, *value)

def from(cmd)
status, stdout, stderr = run_command(:command => cmd)
return "" if stdout.nil?
return "" if stdout.nil? || stdout.empty?
stdout.chomp!.strip
end

Expand All @@ -96,7 +96,7 @@ def provides(*paths)
def from_with_regex(cmd, *regex_list)
regex_list.flatten.each do |regex|
status, stdout, stderr = run_command(:command => cmd)
return "" if stdout.nil?
return "" if stdout.nil? || stdout.empty?
stdout.chomp!.strip
md = stdout.match(regex)
return md[1]
Expand Down

0 comments on commit 3502430

Please sign in to comment.