Skip to content

Commit bada4ac

Browse files
committed
fix(setup): claim hooks directories without owners
1 parent a6df127 commit bada4ac

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

packages/rstack/src/setup/install.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import { spawnSync } from 'node:child_process';
2-
import {
3-
chmodSync,
4-
existsSync,
5-
mkdirSync,
6-
readFileSync,
7-
readdirSync,
8-
statSync,
9-
writeFileSync,
10-
} from 'node:fs';
2+
import { chmodSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
113
import path from 'node:path';
124
import { createHookFiles, hookNames } from './hooks.ts';
135

@@ -195,10 +187,6 @@ const claimOwner = (
195187
return owner === project ? undefined : ownerConflict(owner);
196188
}
197189

198-
if (readdirSync(directory).some((entry) => entry !== '.gitignore')) {
199-
return directoryConflict(gitRoot, directory);
200-
}
201-
202190
try {
203191
// Exclusive creation makes concurrent prepare scripts agree on one owner.
204192
writeFileSync(ownerPath, `${project}\n`, { flag: 'wx' });

0 commit comments

Comments
 (0)