fix(angular): return error when name is missing from package.json (#10356)
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
This commit is contained in:
parent
a89c360f46
commit
0de895d35e
@ -35,8 +35,11 @@ export function normalizeOptions(
|
||||
if (!npmScope) {
|
||||
// use the name (scope if exists) in the root package.json
|
||||
const { name } = readJson(tree, 'package.json');
|
||||
|
||||
if (name) {
|
||||
npmScope = name.startsWith('@') ? name.split('/')[0].substring(1) : name;
|
||||
}
|
||||
}
|
||||
|
||||
return { ...options, npmScope };
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user