angular / angular/angular-cli

getMainFilePath util function fails because of hardcoded target name

Open
#26,517 6 comments 0 reactions 0 assignees View on GitHub
area: @schematics/angular freq1: low severity3: broken type: bug/fix
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
14h 23m
Merged PRs (30d)
162

Description

### Command

add

### Description

I've seen a lot of cases when people are using different name for their build targets, for various reasons. So if the `build` is not found, the `getMainFilePath` fails, which is not right in my opinion

### Describe the solution you'd like

It should ask interactively which target should be used if `build` is not found, when interactivity is enabled in the execution context

### Describe alternatives you've considered

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the getMainFilePath utility and trace how the add command handles a missing build target in an interactive execution context. Check the existing target lookup and interaction flow; done means non-build target names no longer fail silently and an interactive user can choose the target when build is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.