title: Error: spawn terraform ENOENT during Azure Pipeline Terraform
body: <p>When attempting to run <code>terraform init</code> as a task in an Azure Pipeline, it errors stating</p>
  
  <blockquote>
    <p>spawn C:\hostedtoolcache\windows\terraform\0.12.7\x64\terraform.exe ENOENT</p>
  </blockquote>
  
  <p>The installation appears fine, as basic functionality is verified during the install step (<code>terraform version</code>)</p>
  
  <h3>Relevant Pipeline Tasks</h3>
  
  <pre><code>...
    - task: TerraformInstaller@0
      displayName: 'Install Terraform 0.12.7'
      inputs:
        terraformVersion: 0.12.7
    - task: TerraformTaskV1@0
      displayName: 'Terraform : init'
      inputs:
          command: 'init'
          workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform/terraform'
  ...
  </code></pre>
  
  <h3>Install Terraform 0.12.7</h3>
  
  <pre class="lang-bsh prettyprint-override"><code>...
  Verifying Terraform installation...
  C:\hostedtoolcache\windows\terraform\0.12.7\x64\terraform.exe version
  Terraform v0.12.7
  
  Your version of Terraform is out of date! The latest version
  is 0.12.19. You can update by downloading from www.terraform.io/downloads.html
  Finishing: Install Terraform 0.12.7
  </code></pre>
  
  <h3>Terraform : init</h3>
  
  <pre class="lang-bsh prettyprint-override"><code>...
  C:\hostedtoolcache\windows\terraform\0.12.7\x64\terraform.exe validate
  ##[error]Error: There was an error when attempting to execute the process 'C:\hostedtoolcache\windows\terraform\0.12.7\x64\terraform.exe'. This may indicate the process failed to start. Error: spawn C:\hostedtoolcache\windows\terraform\0.12.7\x64\terraform.exe ENOENT
  Finishing: Terraform : validate
  </code></pre>
  
  <hr>
  
  <p>Many other users reported success fixing this by adding a checkout step, but the pipeline automatically does this (presumably previous versions did not), and manually adding it had no effect (actually took 2s longer due to different options).</p>