title: Jenkins pipeline using groovy script : Error while executing sh command
body: <p>I am creating a simple pipeline for terraform as below in jenkins[installed on windows] seems sh command is not working, i have git bash in my system [i.e.: C:\Program Files\Git\bin)]in my system and have provided path in environment variables, still getting an error as below: </p>
  
  <p>java.io.IOException: CreateProcess error=2, The system cannot find the file specified</p>
  
  <p>Caused: java.io.IOException: Cannot run program "nohup" (in directory "C:\Users\XYZ.jenkins\workspace\Pipe_Groovy"): CreateProcess error=2, The system cannot find the file specified</p>
  
  <p>Code for reference: </p>
  
  <pre><code>pipeline {
      agent {
          node {
              label 'master'
          }
      }
  
      stages {
  
          stage('terraform started') {
              steps {
                  sh 'echo "Started...!" '
              }
          }
          stage('git clone') {
              steps {
                  sh 'sudo rm -r *;sudo git clone https://gist.github.com/XXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
              }
          }
          stage('tfsvars create'){
              steps {
                  sh 'sudo cp /home/ec2-user/vars.tf ./jenkins/'
              }
          }
  </code></pre>
  
  <p>Please advice.</p>