Skip to content

Missleading error when having a wrong line config file #20598

@a1466d44-d3dc-4c0b-90c7-315b088731d7

Description

I did this

I have found out the hard way that the syntax in a given config file needs to be precice.

Never the less I wantet to Point out that the error curl gives seems rather missleading.

When placing a wrong line like
Header 'accept: application/json'
in your curl config file and handing it to curl command line tool via the --config option, curl answers with:

Debian

$ curl --config .mycurlrc 
curl: option --config: error encountered when reading a file
curl: try 'curl --help' or 'curl --manual' for more information

Manjaro

$ curl --config .mycurlrc
curl: option --config: is unknown
curl: try 'curl --help' for more information

When fixed the correct error for this example is shown

$ curl --config .mycurlrc
curl: (2) no URL specified
curl: try 'curl --help' or 'curl --manual' for more information

I expected the following

I expected curl to print out that there is an error in the config file, or even better, at what line the error was encountered.

curl/libcurl version

curl 8.18.0 (Manjaro)
curl 8.14.1 (Debian)

operating system

Debian 13 and Manjaro 26

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions