문제

I am writing a custom task for msbuild, it will connect to a Mac using SSH and run a certain command there. I need to obtain the exit status code of that command, and act based on that.

I know that in the OSX terminal I can just run echo $? to get the status code of the previous command but I'm not sure how I can use that to get a value into a variable inside of my custom build task.

도움이 되었습니까?

해결책

I think this will be the responsibility of the library that I use for SSH, in my case it will probably be SharpSSH, and it looks like that does have support for returning the exit code of executed command.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top