Skip to content

Commit

Permalink
fix(core): migration host only handled workspace.json when removing j…
Browse files Browse the repository at this point in the history
…est's tsconfig
  • Loading branch information
vsavkin committed Dec 22, 2020
1 parent 71b93df commit f19333e
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions packages/tao/src/commands/ngcli-adapter.ts
Expand Up @@ -403,14 +403,18 @@ export class NxScopedHostForMigrations extends NxScopedHost {
write(path: Path, content: FileBuffer): Observable<void> {
return this.hasWorkspaceJson().pipe(
concatMap((hasWorkspace) => {
if (
hasWorkspace &&
(path == '/angular.json' || path == 'angular.json')
) {
return super.write(
'/workspace.json' as any,
processConfigWhenWriting(content)
);
if (this.isWorkspaceConfig(path)) {
if (
hasWorkspace &&
(path == '/angular.json' || path == 'angular.json')
) {
return super.write(
'/workspace.json' as any,
processConfigWhenWriting(content)
);
} else {
return super.write(path as any, processConfigWhenWriting(content));
}
} else {
return super.write(path as any, content);
}
Expand Down

0 comments on commit f19333e

Please sign in to comment.