LoadError: could not spawn `curl --version`

Can someone please help me understand this error message?
On my Sytem (Windows10), any call to ‘PkgDev.publish()’ fails with this error message.

LoadError: could not spawn curl --version: no such file or directory (ENOENT)
while loading C:.…\publish.jl, in expression starting on line 17
in _jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, ::Base.DevNullStream, ::Base.DevNullStream, ::Base.DevNullStream) at process.jl:321
in #426 at process.jl:478 [inlined]
in setup_stdio(::Base.##426#427{Cmd,Ptr{Void},Base.Process}, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}) at process.jl:466
in #spawn#425(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}, ::Bool, ::Bool) at process.jl:477
in (::Base.#kw##spawn)(::Array{Any,1}, ::Base.#spawn, ::Cmd, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}, ::Bool, ::Bool) at :0
in curl(::String, ::Cmd) at github.jl:28
in curl(::String, ::Dict{Any,Any}, ::Cmd) at github.jl:44
in token(::String) at github.jl:64
in credentials at github.jl:133 [inlined]
in push_url_and_credentials(::String) at entry.jl:56
in (::PkgDev.Entry.##6#11{Dict{String,Array{String,1}}})(::Base.LibGit2.GitRepo) at entry.jl:104
in with(::PkgDev.Entry.##6#11{Dict{String,Array{String,1}}}, ::Base.LibGit2.GitRepo) at types.jl:701
in publish(::String, ::String) at entry.jl:97
in publish() at PkgDev.jl:70
in include_string(::String, ::String) at loading.jl:441
in include_string(::Module, ::String, ::String) at eval.jl:32
in (::Atom.##59#62{String,String})() at eval.jl:81
in withpath(::Atom.##59#62{String,String}, ::String) at utils.jl:30
in withpath(::Function, ::String) at eval.jl:46
in macro expansion at eval.jl:79 [inlined]
in (::Atom.##58#61{Dict{String,Any}})() at task.jl:60

Windows10 doesn’t ship curl, you should manually install it and add it to Path.

"Windows10 doesn't ship curl, you should manually install it and add it to Path."

Thanks. I am using JuliaPro (v0.5.1.1_build-43) and made the apparently wrong assumption that in the distribution for Windows such tools are already integrated. After all the ‘publish()’ command is a basic one.

I can’t speak about JuliaPro - never used it - but with ‘regular’ Julia on Windows it does matter what terminal you launch from. If I launch from the regular Windows command line and type ;curl I get that error. If I launch from git bash (which has some tools built in) and type ;curl I get curl: try 'curl --help' or 'curl --manual' for more information.

It might be worth looking into native Julia alternatives to curl: HTTP.jl for example

It is kind of funny I found this post because some tests on HTTP.jl are failing on WIndows because it can’t find curl :smiley:

Any idea how to get AppVeyor tests to pass if the tests depends on curl? Tests are passing on Travis now so I’m trying to get AppVeyor to pass as well. Thanks!

It might be helpful if you show us the tests (reduced to some minimal form) which fail.

Thanks @leiteiro. I think I got it. Trying now :pray:. I think I can install curl using WinRPM. Will report back :blush:

btw; Build Environment | AppVeyor lists curl as pre-installed

The test launches a server on a random port, in this case 8661, runs the below command:

run(`bash -c 'curl -v -s http://127.0.0.1:8661/ > tmpout 2>&1'`)

It errors with the following message:

  Got an exception of type Base.UVError outside of a @test
  could not spawn `bash -c 'curl -v -s http://127.0.0.1:8200/ > tmpout 2>&1'`: no such file or directory (ENOENT)

I thought it was curl, but now I think the problem is the bash statement. It doesn’t work on Windows. Any idea?

It might make sense to read a little bit into appveyor doc and forums Support | AppVeyor
as i have the feeling you are not the only one to test with a local server (you might be one of the few to use julia).