0

I have build in TFS 2012, that run script X among other stuff.

If script X passes, everything is good and TFS build succeed

If script X fails, I get message in TFS that script X execution failed with exit status 1, see log for more details., but the build get stuck until I stop it manually.

I have checked if script X leaves any processes open (with process explorer), but it seems it didnt.

Please help. Thanks

Zakk
  • 758
  • 3
  • 11
  • 20

1 Answers1

0

Commonly you should get the return error code from your script, you can use “exit 0” for success and “exit 1” for failures.

Please reference below article and thread for details.

BTW, why don't you consider upgrtading to vNext build (TFS 2015 and later version), in vNext you can set the Control Options for a specific step. And the TFS 2012 is too old, technical support is no longer provided by officials.

See Why You Should Switch to Build VNext for details.

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • I get exit 1 return code from script X. but the build stuck as a result. – Zakk May 14 '18 at 09:10
  • @Zakk Could you please share the script X here for troubleshooting? – Andy Li-MSFT May 15 '18 at 01:13
  • this script X i talked about is huge, it runs few batch files, and those few batch files run other batch files, I can't post it here :( – Zakk May 15 '18 at 08:51
  • @Zakk Have you resolved the issue? any update? I'am afraid we cannot do further troubleshooting if no sharing the scripts. – Andy Li-MSFT May 18 '18 at 09:43
  • As I said the script calls 10+ scripts and not in one call, unfortunately I cant share it. Do you have any tips how I can proceed or fix the issue? – Zakk May 18 '18 at 19:10
  • @Zakk Have you resolved the issue? Generally exit the session will did the trick, but based on limited information can not figure it out.... – Andy Li-MSFT May 30 '18 at 13:36