Retrieve Exit Code from Session.ExecuteCommand

Advertisement

mxcolin
Joined:
Posts:
3
Location:
California

Retrieve Exit Code from Session.ExecuteCommand

I'm using ExecuteCommand on the Session class to call a command remotely however I cannot get at the exit code?

CommandExecutionResult result = session.ExecuteCommand(command.Executable + " " + command.Arguments);

Will throw a SessionRemoteException if the command fails but there's no way to know what the exit code is?

Thanks

Colin

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,726
Location:
Prague, Czechia

Re: Retrieve Exit Code from Session.ExecuteCommand

No, indeed there's no way to retrieve the exit code.

Reply with quote

martin
Site Admin
martin avatar

mxcolin wrote:

Any plans for adding this in anytime soon?
Will consider it. Meanwhile you can dump the exit code to the command output and parse it out yourself.

Reply with quote

Advertisement

You can post new topics in this forum