Skip to content

output stderr when running ssh commands #406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yashsinghcodes
Copy link
Member

I added logic to return an error message if we get anything in stderr.

I'm unsure whether the result should be marked as success: false or true, since the SSH connection was successful, but the command execution on the remote shell failed.

Also yes, do let me know If I should also return the stdout if there is any when we actually return in this case?

This makes it easier for user to know what went wrong.

@frikky
Copy link
Member

frikky commented Apr 24, 2025

I added logic to return an error message if we get anything in stderr.

I'm unsure whether the result should be marked as success: false or true, since the SSH connection was successful, but the command execution on the remote shell failed.

Also yes, do let me know If I should also return the stdout if there is any when we actually return in this case?

This makes it easier for user to know what went wrong.

Don't return at that point at all, I'd say. STDOUT may still have data, so you just add it as an additional field to the same dictionary (e.g. error_logs).

@frikky
Copy link
Member

frikky commented Apr 30, 2025

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants