Skip to content

Commit

Permalink
Fix Windows path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Apr 23, 2024
1 parent 49862ab commit 92de411
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/knip/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { getGitIgnoredFn } from './util/globby.js';
import { getHandler } from './util/handle-dependency.js';
import { getIsIdentifierReferencedHandler } from './util/is-identifier-referenced.js';
import { getEntryPathFromManifest, getPackageNameFromModuleSpecifier } from './util/modules.js';
import { dirname, join } from './util/path.js';
import { dirname, join, toPosix } from './util/path.js';
import { hasMatch } from './util/regex.js';
import { shouldIgnore } from './util/tag.js';
import { loadTSConfig } from './util/tsconfig-loader.js';
Expand Down Expand Up @@ -542,7 +542,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {

if (filename) {
const startTime = performance.now();
const filePath = join(cwd, filename);
const filePath = join(cwd, toPosix(filename));

if (filename.startsWith(CacheConsultant.getCacheLocation())) return;
if (isGitIgnored(filePath)) return;
Expand Down

0 comments on commit 92de411

Please sign in to comment.