Skip to content

Invalid option for a command should give the help for that command instead of the general help #1146

Closed
@flip111

Description

@flip111
» spago build --watch
Invalid option `--watch'

Usage: spago (COMMAND | (-v|--version))
  PureScript package manager and build tool

Available options:
  -h,--help                Show this help text
  -v,--version             Show the current version

Available commands:
  init                     Initialise a new project
  fetch                    Downloads all of the project's dependencies
  install                  Compile the project's dependencies
  uninstall                Remove dependencies from a package
  build                    Compile the project
  run                      Run the project
  test                     Test the project
  bundle                   Bundle the project in a single file
  sources                  List all the source paths (globs) for the
                           dependencies of the project
  repl                     Start a REPL
  publish                  Publish a package
  upgrade                  Upgrade to the latest package set, or to the latest
                           versions of Registry packages
  docs                     Generate docs for the project and its dependencies
  registry                 Commands to interact with the Registry
  ls                       List packages or dependencies
  graph                    Generate a graph of modules or dependencies

Expected the help for the build command instead

» spago build --help
Usage: spago build [--monochrome|--no-color] [--offline] [-q|--quiet]
                   [-v|--verbose] [--backend-args ARGS] [--ensure-ranges]
                   [--json-errors] [--output DIR] [--pedantic-packages] [--pure]
                   [--purs-args ARGS] [-p|--package PACKAGE] ([--verbose-stats]
                   | [--censor-stats]) [--strict]
  Compile the project

Available options:
  --monochrome,--no-color  Force logging without ANSI color escape sequences
  --offline                Do not attempt to use the network. Warning: this will
                           fail if you don't have the necessary dependencies
                           already cached
  -q,--quiet               Suppress all spago logging
  -v,--verbose             Enable additional debug logging, e.g. printing `purs`
                           commands
  --backend-args ARGS      Arguments to pass to the running script
  --ensure-ranges          Add version bounds for all the dependencies of the
                           selected project
  --json-errors            Output compiler warnings/errors as JSON
  --output DIR             The output directory for compiled files
  --pedantic-packages      Check for redundant or missing packages in the config
                           and fail the build if any
  --pure                   Use the package information from the current
                           lockfile, even if it is out of date
  --purs-args ARGS         Arguments to pass to purs compile. Wrap in quotes.
                           `--output` and `--json-errors` must be passed to
                           Spago directly.
  -p,--package PACKAGE     Select the local project to build
  --verbose-stats          Show counts for each warning type
  --censor-stats           Censor warning/error summary
  --strict                 Promotes project sources' warnings to errors
  -h,--help                Show this help text

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions