Skip to content

Commit

Permalink
fix(linter): relative paths should be correct on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Jun 6, 2022
1 parent 4d7e5ba commit bf11ecb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/workspace/src/utils/runtime-lint-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
joinPathFragments,
FileData,
} from '@nrwl/devkit';
import { join } from 'path';
import { join, relative } from 'path';
import { workspaceRoot } from './app-root';
import { getPath, pathExists } from './graph-utils';
import { existsSync } from 'fs';
Expand Down Expand Up @@ -207,7 +207,7 @@ export function onlyLoadChildren(
}

export function getSourceFilePath(sourceFileName: string, projectPath: string) {
return normalizePath(sourceFileName).substring(projectPath.length + 1);
return normalizePath(relative(projectPath, sourceFileName));
}

export function hasBannedImport(
Expand Down

0 comments on commit bf11ecb

Please sign in to comment.