Skip to content

cabal upgrade leads to odd diagnostic #6691

Closed
@jrp2014

Description

@jrp2014

Describe the bug
I inadvertently tyoed cabal upgrade instead of cabal update and got a strange diagnostic

To Reproduce
Steps to reproduce the behavior:

$ cabal upgrade
fromFlag NoFlag. Use fromFlagOrDefault
CallStack (from HasCallStack):
  error, called at ./Distribution/Simple/Flag.hs:98:21 in Cabal-3.2.0.0 w73VV9T25vCb2mhueKgfz:Distribution.Simple.Flag
  fromFlag, called at main/Main.hs:909:15 in main:Main

$ cabal v2-upgrade
cabal: unrecognised command: v2-upgrade (try --help)

Expected behavior
So far as I aware, upgrade is not a valid cabal command so I should get an unrecognised command diagnostic.

System information

  • Operating system: MacOS Catalina
  • cabal, ghc versions: cabal 3.2.0.0, ghc 8.8.3

Additional context
This is obviously not a deal breaker, but it may point to a deeper bug in cabal command line parsing.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions