Skip to content

Commit

Permalink
fix(core): normalize paths in ng cli adapter when finding matching files
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed May 3, 2022
1 parent 378990b commit 59e94a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/nx/src/adapter/ngcli-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,12 @@ function findDeletedProjects(host: Tree): FileChange[] {
}

function findMatchingFileChange(host: Tree, path: Path) {
const targetPath = path.startsWith('/') ? path.substring(1) : path.toString();
const targetPath = normalize(
path.startsWith('/') ? path.substring(1) : path.toString()
);
return host
.listChanges()
.find((f) => f.path === targetPath && f.type !== 'DELETE');
.find((f) => normalize(f.path) === targetPath && f.type !== 'DELETE');
}

function isWorkspaceConfigPath(p: Path | string) {
Expand Down

0 comments on commit 59e94a1

Please sign in to comment.