File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,18 @@ export async function execute(
3232 return { success : false } ;
3333 }
3434
35+ const { projectType } = ( await context . getProjectMetadata ( projectName ) ) as {
36+ projectType ?: string ;
37+ } ;
38+ if ( projectType !== 'application' ) {
39+ context . logger . error (
40+ `Tried to extract from ${ projectName } with 'projectType' ${ projectType } , which is not supported.` +
41+ ` The 'extract-i18n' builder can only extract from applications.` ,
42+ ) ;
43+
44+ return { success : false } ;
45+ }
46+
3547 // Check Angular version.
3648 assertCompatibleAngularVersion ( context . workspaceRoot ) ;
3749
Original file line number Diff line number Diff line change @@ -35,6 +35,18 @@ export async function execute(
3535 return { success : false } ;
3636 }
3737
38+ const { projectType } = ( await context . getProjectMetadata ( projectName ) ) as {
39+ projectType ?: string ;
40+ } ;
41+ if ( projectType !== 'application' ) {
42+ context . logger . error (
43+ `Tried to extract from ${ projectName } with 'projectType' ${ projectType } , which is not supported.` +
44+ ` The 'extract-i18n' builder can only extract from applications.` ,
45+ ) ;
46+
47+ return { success : false } ;
48+ }
49+
3850 // Check Angular version.
3951 assertCompatibleAngularVersion ( context . workspaceRoot ) ;
4052
You can’t perform that action at this time.
0 commit comments