title: How to run nswag code generating script on MacOS
body: <p>I'm trying to run a code generating script from terminal within vs code on a mac, but each time I get the the following error:</p>
  <pre><code>cmd: &quot;..\node_modules\.bin\nswag&quot; run
  cmd : The term 'cmd' is not recognized as the name of a cmdlet, 
  function, script file, or operable program.
  Check the spelling of the name, or if a path was included, verify that 
  the path is correct and try again.
  At ...
  </code></pre>
  <p>here's the ps1 script I was trying to run:</p>
  <pre><code>$invocation = (Get-Variable MyInvocation).Value
  $directorypath = Split-Path $invocation.MyCommand.Path
  Set-Location $directorypath
  $cmdString = &quot;&quot;&quot;&quot; + &quot;..\node_modules\.bin\nswag&quot; + &quot;&quot;&quot;&quot; + &quot; run&quot;;
  Write-Host 'cmd:' $cmdString
  cmd /c $cmdString
  </code></pre>