haskell / haskell/cabal

Give better error message when a global option is passed after command, not before (was "Option `--config-file` not recognized out of order")

Open
#7,704 7 comments 1 reaction 1 assignee Claimed by @zlonast View on GitHub
attention: pr-welcome cabal-install: cmd/sdist re: config-file re: options type: discussion
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

`--config-file` is listed as global option by `cabal --help`, but get/unpack does not recognize it:
```
$ cabal get --config-file=foo
Error: cabal: unrecognized 'get' option `--config-file=foo'
```
(Spawned from https://github.com/haskell/cabal/pull/7702#issuecomment-936880671.)

UPDATE:
```
$ cabal --config-file=foo get bar
```
works, so this is merely an issue about a more user-friendly parsing of command-line options.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.