Skip to content

Commit

Permalink
fix(core): add slash to use exact path (#685) (#687)
Browse files Browse the repository at this point in the history
Co-authored-by: Takeru Yamazaki <takeru.yamazaki@admiral.at>
  • Loading branch information
Take-Limeship and Takeru Yamazaki authored Apr 26, 2023
1 parent 3d4e131 commit 1a87d83
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/core/src/generators/import-projects/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,19 @@ export default async function (
const existingProjectJsonDirectories = getDirectoriesWithProjectJson(host);
for (const projectFile of projectFiles.newLibs) {
if (
!existingProjectJsonDirectories.some((x) => projectFile.startsWith(x))
!existingProjectJsonDirectories.some((x) =>
projectFile.startsWith(x + '/'),
)
) {
await addNewDotnetProject(host, projectFile, false);
logger.log('Found new library', projectFile);
}
}
for (const projectFile of projectFiles.newApps) {
if (
!existingProjectJsonDirectories.some((x) => projectFile.startsWith(x))
!existingProjectJsonDirectories.some((x) =>
projectFile.startsWith(x + '/'),
)
) {
await addNewDotnetProject(host, projectFile, true);
logger.log('Found new application', projectFile);
Expand Down

0 comments on commit 1a87d83

Please sign in to comment.