Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: when generating app with no 'test'/'src' folder to move #1493

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/lib/sub-app/sub-app.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,8 @@ function moveDirectoryTo(
tree.getDir(srcDir).visit((filePath: Path, file: Readonly<FileEntry>) => {
const newFilePath = join(destination as Path, filePath);
tree.create(newFilePath, file.content);
tree.delete(filePath);
tree.delete(srcDir);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though it may fix the reported issue, are we sure that calling tree.delete(srcDir); X times makes sense?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed

although we're calling tree.delete several times, looks like angular schematics is treating such usage:

image

I'm still trying another way to achieve that. tree.exists didn't worked, just the usual try-catch on tree.delete

});
tree.delete(srcDir);
}

function addAppsToCliOptions(
Expand Down