Permalink
Browse files

Fix bug

  • Loading branch information...
1 parent 35e59f3 commit 283fb6bafc8d317b9ba3dcf5f98a5045ebaa2737 @gigamo committed Jul 4, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/aurb/main.rb
View
@@ -24,7 +24,7 @@ class Main < Thor
:banner => 'Keep the tarball after downloading'
def download(*pkgs)
pkgs = Aurb.download(*pkgs)
- raise Aurb::NoResultsError if pkgs.blank?
+ raise Aurb::NoResultsError if pkgs.empty?
path = if options.path.start_with?('/')
options.path
@@ -60,7 +60,7 @@ def download(*pkgs)
desc 'search PACKAGES', 'Search for packages'
def search(*pkgs)
pkgs = Aurb.search(*pkgs)
- raise Aurb::NoResultsError if pkgs.blank?
+ raise Aurb::NoResultsError if pkgs.empty?
pkgs.each do |package|
status = package.OutOfDate == '1' ? ''.colorize(:red) : ''.colorize(:green)
@@ -75,7 +75,7 @@ def search(*pkgs)
desc 'info PACKAGE', 'List all available information for a given package'
def info(pkg)
info = Aurb.info(pkg)
- raise Aurb::NoResultsError if info.blank?
+ raise Aurb::NoResultsError if info.empty?
info.each do |key, value|
(key.size..10).each { print ' ' }
@@ -88,7 +88,7 @@ def info(pkg)
def upgrade
list = `pacman -Qm`.split(/\n/)
pkgs = Aurb.upgrade(*list)
- raise Aurb::NoResultsError if pkgs.blank?
+ raise Aurb::NoResultsError if pkgs.empty?
pkgs.each do |package|
puts "#{package.to_s.colorize(:yellow)} has an upgrade available"

0 comments on commit 283fb6b

Please sign in to comment.