Skip to content

Commit

Permalink
Merge pull request #1493 from micalevisk/patch-1
Browse files Browse the repository at this point in the history
fix: when generating app with no 'test'/'src' folder to move
  • Loading branch information
kamilmysliwiec authored Jul 31, 2023
2 parents 07be8d0 + 93cb879 commit 9a7bcfe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib/sub-app/sub-app.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,15 @@ function moveDirectoryTo(
destination: string,
tree: Tree,
): void {
let srcDirExists = false;
tree.getDir(srcDir).visit((filePath: Path, file: Readonly<FileEntry>) => {
srcDirExists = true;
const newFilePath = join(destination as Path, filePath);
tree.create(newFilePath, file.content);
tree.delete(filePath);
});
tree.delete(srcDir);
if (srcDirExists) {
tree.delete(srcDir);
}
}

function addAppsToCliOptions(
Expand Down

0 comments on commit 9a7bcfe

Please sign in to comment.