Skip to content

weird error message when using option with single dash #20976

Closed

Description

@jnizet

🐞 Bug report

Command (mark with an x)

all of them

Is this a regression?

I don't think so

Description

When passing an option with a single dash instead of two, the error message is weird and unhelpful. For example:

ng test -watch=false   
Unknown option: '-h'

I would expect something like:

ng test -watch=false   
Unknown option: '-watch'. Options start with two dashes. Did you mean '--watch'?

🌍 Your Environment


Angular CLI: 12.0.1
Node: 12.20.1
Package Manager: yarn 1.22.10
OS: darwin x64

Angular: 12.0.1
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, localize, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.1
@angular-devkit/build-angular   12.0.1
@angular-devkit/core            12.0.1
@angular-devkit/schematics      12.0.1
@schematics/angular             12.0.1
rxjs                            6.6.7
typescript                      4.2.4

Activity

  1. modified the milestone: Backlog on May 28, 2021
  2. added a commit that references this issue on Mar 9, 2022
    2e04931
  3. angular-automatic-lock-bot commented on Apr 9, 2022

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  4. locked and limited conversation to collaborators on Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions