Skip to content

Commit 2afffe0

Browse files
authoredFeb 5, 2025··
fix: ensure augmentWorkspace honors tsConfig rootDir (#933)
1 parent 3cf1d05 commit 2afffe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/knip/src/util/to-source-path.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const matchExt = /(\.d)?\.(m|c)?(j|t)s$/;
1313

1414
export const augmentWorkspace = (workspace: Workspace, dir: string, compilerOptions: CompilerOptions) => {
1515
const srcDir = join(dir, 'src');
16-
workspace.srcDir = (compilerOptions.rootDir ?? isDirectory(srcDir)) ? srcDir : dir;
16+
workspace.srcDir = compilerOptions.rootDir ?? (isDirectory(srcDir) ? srcDir : dir);
1717
workspace.outDir = compilerOptions.outDir || workspace.srcDir;
1818
};
1919

0 commit comments

Comments
 (0)
Please sign in to comment.