Build Forge fail results in 0?
![]()
Hello, everyone. I'm trying to minimize my number of steps in my build forge projects and I've come across a problem. If I have a statement that tries to perform an action, i.e copy B to A , but B doesn't exist I get an error and the step fails like expected. However, if I have another command after that one and it performs correctly then the step passes.
What I would like to have happen is when there is an error or a failure that would normally produce a result of something other than 0 I want the whole step/project to fail out. I've looked into setting/checking the %errorlevel% variable but I can't seem to make that work. Truthfully I don't know if that's not working or the ability to tell build forge to quit if the error level neq 0. Sample Code: :DEV If $TARGET_ENVIRONMENT == Development ( cd d:\bld\$BF_PROJECTNAME\$BF_TAG\$SVN_RELEASENUMBER\$TARGET_IISVIRTUALDIR del Web.config copy WebDev.config Web.config ) :QA If $TARGET_ENVIRONMENT == QA ( cd d:\bld\$BF_PROJECTNAME\$BF_TAG\$SVN_RELEASENUMBER\$TARGET_IISVIRTUALDIR del Web.config copy WebQA.config Web.config ) So, if the TARGET_ENVIRONMENT = Development and it goes through that process, if webdev.config doesn't exist it produces an error, but then the QA value is checked and it resets the errorlevel back to 0, regardless of the equality. |
One answer
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.