Skip to content

Commit

Permalink
Revert part of cb4a9c5
Browse files Browse the repository at this point in the history
Changes to lib/riak/node/console.rb made a mistake about whether to use
invalid pipes.
  • Loading branch information
aphyr committed Jan 30, 2012
1 parent c9f939b commit b5d61f1
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/riak/node/console.rb
Expand Up @@ -34,13 +34,16 @@ def initialize(pipedir, nodename)
@prompt = /\(#{Regexp.escape(nodename)}\)\d+>\s*/ @prompt = /\(#{Regexp.escape(nodename)}\)\d+>\s*/
pipedir = Pathname(pipedir) pipedir = Pathname(pipedir)
pipedir.children.each do |path| pipedir.children.each do |path|
debug "Non-pipe found! #{path}" unless path.pipe? if path.pipe?
if path.fnmatch("*.r") # Read pipe if path.fnmatch("*.r") # Read pipe
# debug "Found read pipe: #{path}" # debug "Found read pipe: #{path}"
@rfile ||= path @rfile ||= path
elsif path.fnmatch("*.w") # Write pipe elsif path.fnmatch("*.w") # Write pipe
# debug "Found write pipe: #{path}" # debug "Found write pipe: #{path}"
@wfile ||= path @wfile ||= path
end
else
debug "Non-pipe found! #{path}"
end end
end end
raise ArgumentError, t('no_pipes', :path => pipedir.to_s) if [@rfile, @wfile].any? {|p| p.nil? } raise ArgumentError, t('no_pipes', :path => pipedir.to_s) if [@rfile, @wfile].any? {|p| p.nil? }
Expand Down

0 comments on commit b5d61f1

Please sign in to comment.