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
output = ls("/")
print(output.exit_code) # should be 0
This code does not work as described - when run in the terminal it returns an exception. It seems the way to make it work as described is -
ls("/", _return_cmd=True)
print(output.exit_code) # should be 0
this seems to include a larger issue, where the object returns is a string instead of a RunningComand object.. a fix for this may also be planned, but for now maybe consider fixing the docs?
The text was updated successfully, but these errors were encountered:
In the "Exit Codes and Exceptions" section of the documentation -https://github.com/amoffat/sh/blob/develop/docs/source/sections/exit_codes.rst#exit-codes--exceptions
there is the first example code
This code does not work as described - when run in the terminal it returns an exception. It seems the way to make it work as described is -
this seems to include a larger issue, where the object returns is a string instead of a
RunningComand
object.. a fix for this may also be planned, but for now maybe consider fixing the docs?The text was updated successfully, but these errors were encountered: