Skip to content

Commit c804fc7

Browse files
committed
Attempt to fix tests
1 parent 16b08a7 commit c804fc7

File tree

1 file changed

+5
-5
lines changed
  • packages/knip/src/plugins/lefthook

1 file changed

+5
-5
lines changed

packages/knip/src/plugins/lefthook/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ const enablers = ['lefthook', '@arkweid/lefthook', '@evilmartians/lefthook'];
1313

1414
const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
1515

16-
const gitHookPaths = getGitHookPaths();
17-
18-
const config = ['lefthook.yml', ...gitHookPaths];
19-
2016
type Command = {
2117
run: string;
2218
root: string;
@@ -54,6 +50,10 @@ export default {
5450
title,
5551
enablers,
5652
isEnabled,
57-
config,
53+
get config() {
54+
const gitHookPaths = getGitHookPaths();
55+
56+
return ['lefthook.yml', ...gitHookPaths];
57+
},
5858
resolveConfig,
5959
} satisfies Plugin;

0 commit comments

Comments
 (0)