title: Why is this condition in Jenkins pipeline not working?
body: <p>I am getting mad about the following pipeline code, as it does not do what I expect. Does anyone have an idea what I am doing wrong?</p>
  
  <p>Here is my pipeline code to define the parameter</p>
  
  <pre><code>
  pipeline {
      agent any
      parameters { booleanParam(name: 'bForceCheckout', defaultValue: false, description: '') }
  
      ...
  </code></pre>
  
  <p>And here  the stage itself</p>
  
  <pre><code>
  stage('SVN Checkout') {
     // Get code from SVN repository
     steps {
        script {
  
           // If project is not yet checked out, setup checkout structure, i.e. which
           // folders will be checked out and which will not be checked out
           retry (5) {
              try {
                 def svnInfoError = bat (returnStatus: true, script: "svn info ${projectName}")
                 // bForceCheckout has to be set as parameter in the job
  
                 println "---&gt; " + ((svnInfoError != 0) || bForceCheckout)
  
                 if ((svnInfoError != 0) || bForceCheckout) {
  
  
                    println "svnInfoError:  " + svnInfoError
                    println "bForceCheckout: " + bForceCheckout
  
                    timeout(activity: true, time: 90, unit: 'MINUTES') {
  
                       // Clean up
                       deleteDir ()
  
                       ... some SVN related stuff ...
                    }
                 }
              } catch (Exception ex) {
                 // Clean up
                 deleteDir ()
  
                 println(ex.toString());
  
                 error ("SVN checkout: directory structure could not be set up")
              }
           }
        }
     }
  }
  
  </code></pre>
  
  <p>And here is the console output. As you can see, <em>svnInfoError</em> and <em>bForceCheckout</em> are 0 / false, but the part in the if condition still get executed...</p>
  
  <pre><code>12:51:22  
  [Pipeline] echo
  12:51:22  ---&gt;false
  [Pipeline] echo
  12:51:23  svnInfoError:  0
  [Pipeline] echo
  12:51:23  bForceCheckout: false
  [Pipeline] timeout
  12:51:23  Timeout set to expire after 1 hr 30 min without activity
  [Pipeline] {
  [Pipeline] deleteDir
  
  [Pipeline] bat
  12:55:21  
  
  </code></pre>