title: How to run bash from arbitrary build tasks in Visual Studio 2017 (directory-based project)?
body: <p>I'm trying to enable <a href="https://docs.microsoft.com/en-us/visualstudio/ide/develop-code-in-visual-studio-without-projects-or-solutions#enable-custom-build-tools" rel="nofollow noreferrer">custom build tasks</a> to use bash to build DocBook-based documentation in Visual Studio 2017. I use built-in Windows Subsystem for Linux in Windows 10. I can launch cmd.exe and run <code>dir</code> as in MS's examples. However, I need to run <code>make ARGS</code> in bash and that's where I it fails with:</p>
  
  <pre><code>  '"bash"' is not recognized as an internal or external command,
    operable program or batch file.
  </code></pre>
  
  <p>I can run cmd.exe interactively and start bash without any problems. But it fails in Visual Studio. Does VS2017 use some special environment? How to make it run bash via those tasks? I guess that I am missing something very simple and trivial, but I don't understand where to look at.</p>
  
  <p>Essentially, I want to run <code>make all-html</code> command against the path with my DocBook sources.</p>
  
  <p>Here is a minimal task example:</p>
  
  <pre><code>{
    "version": "0.2.1",
    "tasks": [
      {
        "taskName": "Build all-html",
        "appliesTo": "*",
        "type": "command",
        "command": "bash"
      }
    ]
  }
  </code></pre>