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:
cmd: "..\node_modules\.bin\nswag" 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 ...
here's the ps1 script I was trying to run:
$invocation = (Get-Variable MyInvocation).Value
$directorypath = Split-Path $invocation.MyCommand.Path
Set-Location $directorypath
$cmdString = """" + "..\node_modules\.bin\nswag" + """" + " run";
Write-Host 'cmd:' $cmdString
cmd /c $cmdString