Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

TIP: When echo command fails with "CreateProcess error=2" #2032

mrmrcoleman ·
Hello,

Maybe this is obvious to everyone here, but it just cost me 45 minutes so I thought I'd share a tip just in case it is useful to anybody else.

I'm running on a Windows build agent and was trying to run an echo command but it kept failing with the following (anonymized output):

ERROR - Step 'master>Build Pipeline>xxxx build step' is failed. com.pmease.quickbuild.QuickbuildException: Cannot run program "echo" (in directory "C:\xxx\xxx\xxx"): CreateProcess error=2, The system cannot find the file specified 


The trick in the end was to replace this:

echo "foobar"


with this:

cmd /c echo "foobar"


As with all problems, the answer is obvious when you know it!

Hope it helps,

Mark
  • replies 0
  • views 3026
  • stars 0