Skip to content

defaultCollection is relative to where cmd is run not angular.json #23136

Closed

Description

@kvart714

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

No, it's is duplicate of #15014

Description

angular json - ng-g-c-bug - Visual Studio Code

🔬 Minimal Reproduction

Repo example: https://github.com/kvart714/ng-g-c-bug

It includes custom schematic.
Command ng g c works in project folder, but not works in nested folders due to relative path.

Activity

  1. added
    freq1: low
    on May 16, 2022
  2. added this to the Backlog milestone on May 16, 2022
  3. added 2 commits that reference this issue on May 16, 2022
    745a76e
    1155e50
  4. added 2 commits that reference this issue on May 17, 2022
    c71832f
    db0cb55
  5. added a commit that references this issue on May 18, 2022
    44b93cd
  6. added a commit that references this issue on May 18, 2022
    e20964c
  7. kvart714 commented on May 21, 2022

    @kvart714
    Author

    @alan-agius4 I tried your fix. Now it works, but it works differently between default and custom schematics. This ignores any subfolders now.

    In the screenshot, I ran the command twice from the same folder, but the components were created in different folders:
    image

    I commit example: https://github.com/kvart714/ng-g-c-bug

  8. alan-agius4 commented on May 23, 2022

    @alan-agius4
    Collaborator

    Hi @kvart714,
    I have a PR in flight to address the above issue #23198

    For next time, it would be great if you could open a separate issue. Thanks.

  9. angular-automatic-lock-bot commented on Jun 23, 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.

  10. locked and limited conversation to collaborators on Jun 23, 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

    Labels

    area: @angular/clifreq1: lowseverity3: brokentype: bug/fix

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions