Skip to content

updateWorkspace rule doesn't detect new targets to targets when empty #15403

@bgotink

Description

@bgotink

🐞 Bug report

Command (mark with an x)

Anything schematics-related

Is this a regression?

Not that I know of

Description

updateWorkspace doesn't detect targets that are added to a project that didn't contain any targets yet.

🔬 Minimal Reproduction

Use updateWorkspace to add a target to an existing project that doesn't already have a target. The new target won't be detected and will not be comitted to disk by the schematic.

Repro: https://github.com/bgotink/angular-update-workspace-repro

🔥 Exception or Error

None

🌍 Your Environment



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.2.2
Node: 10.15.3
OS: darwin x64
Angular: undefined
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.802.2
@angular-devkit/core         8.2.2
@angular-devkit/schematics   8.2.2
@angular/cli                 8.2.2
@schematics/angular          8.2.2
@schematics/update           0.802.2
rxjs                         6.4.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions