Curl: command not found

jacob.beck's Avatar


20 Mar, 2017 07:24 PM

Our build script includes a curl command. We're now getting this error on the line where we try to curl a file:

`'curl' is not recognized as an internal or external command, operable program or batch file.`

This wasn't the case as of this morning.

  1. Support Staff 1 Posted by Feodor Fitsner on 20 Mar, 2017 07:31 PM

    Feodor Fitsner's Avatar

    Will take a look. Thanks for reporting that.

  2. Support Staff 2 Posted by Feodor Fitsner on 20 Mar, 2017 07:49 PM

    Feodor Fitsner's Avatar

    OK, found the issue. We are rolling out an update to build worker images and there is latest Git 2.12.0 installed.

    Previous versions of Git had curl.exe in C:\Program Files\Git\usr\bin folder which is added in PATH on build workers. The main reason it was on PATH was ssh.exe utility Git (and Mercurial) required to fetch repo via SSH.

    Now, curl.exe has gone from C:\Program Files\Git\usr\bin and left in C:\Program Files\Git\mingw64\bin only. To fix the build add this to your appveyor.yml:

    - set PATH=C:\Program Files\Git\mingw64\bin;%PATH%

    Alternatively, CURL can be installed via Chocolatey or used from other locations such as MinGW, Cygwin and MSYS:

    I don't know whether we should explicitly add C:\Program Files\Git\mingw64\bin folder into PATH on build workers or not - there is always a risk of causing another conflict. Less stuff on PATH is better.

  3. 3 Posted by Tom on 20 Mar, 2017 08:33 PM

    Tom's Avatar

    Thanks Feodor, this fix worked for me:
    - set PATH=C:\Program Files\Git\mingw64\bin;%PATH%

  4. 4 Posted by jacob.beck on 20 Mar, 2017 08:33 PM

    jacob.beck's Avatar

    This worked, thank you!

  5. 5 Posted by Edward Z. Yang on 21 Mar, 2017 01:34 AM

    Edward Z. Yang's Avatar

    This fix didn't work for me; does anyone know what I am doing wrong? Here's a failing build log:

  6. 6 Posted by Edward Z. Yang on 21 Mar, 2017 04:37 AM

    Edward Z. Yang's Avatar

    Answer: set PATH after refreshenv; otherwise it gets clobbered ;)

  7. 7 Posted by Blair Conrad on 21 Mar, 2017 07:51 PM

    Blair Conrad's Avatar

    Thanks for the speedy response, Feodor.
    I've an additional question, though: I see that the VS2017 environment doesn't have MinGW:

    I'm not on that environment yet, but thinking about moving. Will MinGW appear, or should I look for an alternative to that curl?

  8. Support Staff 8 Posted by Feodor Fitsner on 21 Mar, 2017 09:51 PM

    Feodor Fitsner's Avatar

    We'll install curl on Visual Studio 2017 image too:

    For now it can be easily installed with choco install curl during the build.

  9. 9 Posted by Blair Conrad on 22 Mar, 2017 10:11 AM

    Blair Conrad's Avatar

    Thanks, Feodor.

  10. 10 Posted by Syafina on 06 Jul, 2018 08:47 AM

    Syafina's Avatar

    Thank You so much.. Feodor...

  11. Ilya Finkelshteyn closed this discussion on 27 Aug, 2018 07:57 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac