Skip to content

Commit

Permalink
fix(linter): relative paths should be correct on windows (#10604)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Jun 7, 2022
1 parent fd1194e commit 838170e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/workspace/src/utils/runtime-lint-utils.ts
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

1 comment on commit 838170e

@vercel
Copy link

@vercel vercel bot commented on 838170e Jun 7, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx.dev
nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.