MarketSquare / SSHLibrary

Robot Framework test library for SSH and SFTP
http://marketsquare.github.io/SSHLibrary/
Other
158 stars 139 forks source link

Write takes argument from the last Write keyword executed #427

Open MustBeMerrick opened 1 year ago

MustBeMerrick commented 1 year ago

This is a similar, if not identical issue to issue387.

I have the following keyword sequence:

Write  source /home/file\n
Read Until Prompt  strip_prompt=True
Write  rm -rf /path/to/some/other/dir
Read Until Prompt  strip_prompt=True

The TRACE return of the second Write keyword is:
TRACE Return: ' source /home/file\r\n' and the TRACE return of the second Read Until Prompt keyword is: TRACE Return: 'rm -rf /path/to/some/other/dir\r\n'

So it seems that the argument of the first Write keyword was queued on the remote system, and the second Write keyword argument was returned as the stdout of itself (rm -rf /path/to/some/other/dir had a stdout of rm -rf /path/to/some/other/dir)

Any help is appreciated

vr-n-able commented 1 year ago

I noticed that it somehow relates to os , i have similar scenario. On windows it fails with same error (eg if i run it from win machine, but when i run it on docker it works)