Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Relax the regular expression in Net::SSH::Shell::Process#on_stdout
Browse files Browse the repository at this point in the history
This regex made it so that `before` in the next line never can contain anything (because it matches the beginning of the `data` string). It therefor can never call finished! when there's any output on the last command?

With this change the code seems to work fine for me. I would have added a test if there were any.
  • Loading branch information
Sven Fuchs authored and mitchellh committed Jun 13, 2011
1 parent 17cb743 commit 1ebd626
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net/ssh/shell/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def output!(data)
end

def on_stdout(ch, data)
if data.strip =~ /^#{manager.separator} (\d+)$/
if data.strip =~ /#{manager.separator} (\d+)$/
before = $`
output!(before) unless before.empty?
finished!($1)
Expand Down

0 comments on commit 1ebd626

Please sign in to comment.