fix(angular): handle different workspace version and format when falling back to the angular cli (#8993)
This commit is contained in:
parent
a86f5d8b1c
commit
1cae869ff0
@ -103,6 +103,7 @@ export function initLocal(workspace: Workspace) {
|
||||
})
|
||||
);
|
||||
} else {
|
||||
require('@nrwl/tao/src/compat/compat');
|
||||
loadCli(workspace, '@angular/cli/lib/init.js');
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,12 +58,12 @@ if (!patched) {
|
||||
`@angular-devkit/core/src/workspace/json/reader`,
|
||||
]);
|
||||
const originalReadJsonWorkspace = readJsonUtils.readJsonWorkspace;
|
||||
readJsonUtils.readJsonWorkspace = (
|
||||
readJsonUtils.readJsonWorkspace = async (
|
||||
path,
|
||||
host: { readFile: (p) => Promise<string> }
|
||||
) => {
|
||||
try {
|
||||
return originalReadJsonWorkspace(path, host);
|
||||
return await originalReadJsonWorkspace(path, host);
|
||||
} catch {
|
||||
logger.debug(
|
||||
'[NX] Angular devkit readJsonWorkspace fell back to Nx workspaces logic'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user