Method EnsureSuccess
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
EnsureSuccess()
Throws unless the command succeeded, that is, exited with status 0; returns this result when it did, so calls chain:
(await client.RunCommandAsync("make")).EnsureSuccess().StandardOutputText.
public SshCommandResult EnsureSuccess()
Returns
- SshCommandResult
This result.
Exceptions
- SshCommandException
The command exited with a non-zero status, was ended by a signal, or ended without reporting either. The exception carries the status, the signal and the last 4 KiB of standard error, but not standard output.