delano/rye — Issue #12: syntax error, unexpected tIDENTIFIER, expecting $end
Author: rtacconi
Created: 2011-11-13 17:23:45+00:00
State: open

A medium complex command (safe mode disable) is causing this error

ruby-1.9.3-preview1 :047 > rbox.execute "echo -e "new_passwd\\nnew_passwd" | passwd a_user"
SyntaxError: (irb):47: syntax error, unexpected tIDENTIFIER, expecting $end
rbox.execute "echo -e "new_passwd\\nnew_passwd" | passwd a_user"
^
from /Users/riccardotacconi/.rvm/rubies/ruby-1.9.3-preview1/bin/irb:16:in `

'
ruby-1.9.3-preview1 :048 > rbox.execute "echo -e "new_passwd\nnew_passwd" | passwd a_user"
SyntaxError: (irb):48: syntax error, unexpected tIDENTIFIER, expecting $end
rbox.execute "echo -e "new_passwd\nnew_passwd" | passwd a_user"
^
from /Users/riccardotacconi/.rvm/rubies/ruby-1.9.3-preview1/bin/irb:16:in `

'

So execute does not like \n

I would like to know how to respond to a server prompt, like send/expect