Skip to content

Update keywork SSHLIB keyword : Execute Command #478

Description

@astrowalker2013

For the needs of a testing project, we had to create a custom keyword based on Execute Command, with the ability to run commands in an interactive shell to make use of environment variables properly.

Here's what we added:

SSHLibrary.Execute Command bash -ic ${command} return_stdout=True return_stderr=True return_rc=True

This allows us to run the command in an interactive terminal using bash -ic, which is essential in some cases (e.g., when relying on environment variables defined in user profiles or scripts).

Proposal:
It would be helpful to add an optional argument to the Execute Command keyword that enables interactive terminal execution, such as appending bash -ic automatically. This would make interactive execution an official and configurable feature.

If this is something you'd consider adding, I'm happy to contribute and submit a pull request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions