When I run Start-Process -FilePath "pnpm" -ArgumentList "run", "build" -NoNewWindow
I got the error this command cannot be run due to the error: %1 is not a valid Win32 application.
But if I change it for npm Start-Process -FilePath "npm" -ArgumentList "run", "build" -NoNewWindow
, it seems like it works. The project is using pnpm, this is the fragment of code that I am trying to execute in PowerShell on a windows machine inside a .ps1f file:
$processResult = Start-Process `
-FilePath $Tool `
-ArgumentList $ArgumentList `
-NoNewWindow `
-PassThru `
-Wait
Any ideas? thaks!!