Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack does not say which were the invalid flags #1461

Closed
ndmitchell opened this issue Dec 2, 2015 · 3 comments
Closed

stack does not say which were the invalid flags #1461

ndmitchell opened this issue Dec 2, 2015 · 3 comments

Comments

@ndmitchell
Copy link
Contributor

In the nested submodes, Stack doesn't say what flags are invalid, which is a pain:

  C:\Neil\shake>stack --version
  Version 0.1.9.0, Git revision c7178d4d7fa779aafc67a2b48485d01b9435739f i386

  C:\Neil\shake>stack build --foo=1
  Usage: stack build [TARGET] [--library-profiling] [--executable-profiling]
                     [--haddock] ([--haddock-deps] | [--no-haddock-deps])
                     [--dry-run] [--pedantic] [--fast] [--ghc-options OPTION]
                     [--flag PACKAGE:[-]FLAG] [--copy-bins] [--prefetch]
                     ([--dependencies-only] | [--only-snapshot] |
                     [--only-dependencies]) ([--file-watch] | [--file-watch-poll])
                     ([--keep-going] | [--no-keep-going]) [--force-dirty] [--test]
                     [--no-rerun-tests] [--test-arguments TEST_ARGS] [--coverage]
                     [--no-run-tests] [--bench] [--benchmark-arguments BENCH_ARGS]
                     [--no-run-benchmarks] [--exec CMD [ARGS]] [--only-configure]
                     [--reconfigure] [--cabal-verbose] [--help]
    Build the package(s) in this directory/configuration
@drwebb
Copy link
Contributor

drwebb commented Dec 3, 2015

I submitted this as an issue on optparse-applicative's issue tracker, it was fixed in a recent commit.

pcapriotti/optparse-applicative#164

@HuwCampbell
Copy link

Upgrading to optparse 12.1 should fix this issue.

@mgsloan
Copy link
Contributor

mgsloan commented Jan 27, 2016

Stack now uses optparse-applicative-0.12.1.0

mgsloan@computer:~/fpco/stack$ stack build --foo=1
Invalid option `--foo=1'

Usage: stack build [--trace] [--profile] [TARGET] [--[no-]library-profiling]
                   [--[no-]executable-profiling] [--[no-]haddock]
                   [--[no-]haddock-deps] [--dry-run] [--pedantic] [--fast]
                   [--ghc-options OPTION] [--flag PACKAGE:[-]FLAG]
                   [--[no-]copy-bins] [--prefetch] ([--dependencies-only] |
                   [--only-snapshot] | [--only-dependencies]) ([--file-watch] |
                   [--file-watch-poll]) [--[no-]keep-going] [--force-dirty]
                   [--[no-]test] [--[no-]rerun-tests]
                   [--test-arguments TEST_ARGS] [--coverage] [--no-run-tests]
                   [--[no-]bench] [--benchmark-arguments BENCH_ARGS]
                   [--no-run-benchmarks] [--exec CMD [ARGS]] [--only-configure]
                   [--reconfigure] [--cabal-verbose] [--help]
  Build the package(s) in this directory/configuration

@mgsloan mgsloan closed this as completed Jan 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants