You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I haven't found the way how to do this internally, but it certainly is a bit puzzling. When a command executed with exec.send_command("ls -al").unwrap(); like in the exec example succeeds, the send_command() will return the Result containing output.
However, if it doesn't succeed on the remote machine, the remote will print the error to stderr. For most commands at least. Then the returned value from send_command() will still be Ok() but without any contained data.
I mitigated this with 2>&1 after every command to redirect stderr it to stdout on the remote machine. But I wonder if this shouldn't be built in.
The text was updated successfully, but these errors were encountered:
Maybe I haven't found the way how to do this internally, but it certainly is a bit puzzling. When a command executed with
exec.send_command("ls -al").unwrap();
like in the exec example succeeds, thesend_command()
will return the Result containing output.However, if it doesn't succeed on the remote machine, the remote will print the error to
stderr
. For most commands at least. Then the returned value fromsend_command()
will still be Ok() but without any contained data.I mitigated this with
2>&1
after every command to redirectstderr
it tostdout
on the remote machine. But I wonder if this shouldn't be built in.The text was updated successfully, but these errors were encountered: