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
Rye:Err is raised when a ssh command returns 1 #31
Comments
I chose to return an exception for non-zero exit codes to avoid any ambiguity around successes and failures. Ideally Rye.shell would be consistent with that, but the class usage is kind of a special case in the sense that it's really only used as a replacement for backticks or
|
Hi, I hit this problem with the "ps" command when I wanted to see if a To handle that I had to add an exception handler. I would prefer to get the same as under the shell, with no output in my Don't know if this is possible under Rye. Best regards On 03/29/2013 06:13 PM, Delano Mandelbaum wrote:
|
Yes, disabling exception based on command return codes would resolve it. Thanks! |
What's about raising an exception when stderr isn't empty? |
mixlib-shellout e.g. has a method 'error!' which does exactly that, raise an exception when stderr isn't empty, but that has to be called explicitly, bound to the command called before. I think such an approach makes more sense => let the user decide when an exit code <> 0 is really critical or an exception |
👍 |
Is there a fix for that issue now ? I'm trying to delete an unexisting file and I want to handle exception by my self but the stderr is always printed in my shell. I would just like to hide it and display a custom error message in place of. |
@Hito01 You can pass the option |
Well, I already tried this : But the error is still displayed in my terminal. Here is the command that I try to execute. In fact the repository doesn't exist and so I get something like : Please make sure you have the correct access rights and the repository exists. Where am I wrong ? |
You can also try adding an exception hook for the See: |
Hi,
I'm playing with rye and discovered that rye behaves differently when executing commands local or via ssh
Why does rye raise an exception when I want to check if a directory exists?
The text was updated successfully, but these errors were encountered: