password callback working
[scpubgit/Object-Remote.git] / lib / Object / Remote / Connector / LocalSudo.pm
index c6bad11..6eed5e6 100644 (file)
@@ -36,6 +36,9 @@ sub _start_perl {
       unless $cb;
     print $foreign_stdin $cb->($line, @_), "\n";
     chomp($line = <$sudo_stderr>);
+    die "sent password and expected newline from sudo, got ${line}"
+      if $line;
+    chomp($line = <$sudo_stderr>);
     die "sent password but next line was ${line}"
       unless $line eq "GO";
   } else {