Skip to content

Commit

Permalink
Print relative .gitignore paths in debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Jul 20, 2024
1 parent f5680fb commit fef3dba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/knip/src/util/globby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { GLOBAL_IGNORE_PATTERNS, ROOT_WORKSPACE_NAME } from '../constants.js';
import { timerify } from './Performance.js';
import { debugLogObject } from './debug.js';
import { isFile } from './fs.js';
import { dirname, join, relative, toPosix } from './path.js';
import { dirname, join, relative, toPosix, toRelative } from './path.js';

const walk = promisify(_walk);

Expand Down Expand Up @@ -73,7 +73,7 @@ async function parseFindGitignores(options: Options): Promise<Gitignores> {
};

const addFile = (filePath: string) => {
gitignoreFiles.push(filePath);
gitignoreFiles.push(toRelative(filePath));

const dir = dirname(toPosix(filePath));
const base = relative(options.cwd, dir);
Expand Down

0 comments on commit fef3dba

Please sign in to comment.