# File lib/backup/cli/helpers.rb, line 67 def utility(name) name = name.to_s.strip raise Errors::CLI::UtilityNotFoundError, 'Utility Name Empty' if name.empty? path = UTILITY[name] || %x[which #{ name } 2>/dev/null].chomp if path.empty? raise Errors::CLI::UtilityNotFoundError, "Could not locate '\#{ name }'.\nMake sure the specified utility is installed\nand available in your system's $PATH.\n" end UTILITY[name] = path end