From bada4ac12cd257139598a2cc81773e519467d391 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 10 Aug 2026 19:06:26 +0800 Subject: [PATCH] fix(setup): claim hooks directories without owners --- packages/rstack/src/setup/install.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/rstack/src/setup/install.ts b/packages/rstack/src/setup/install.ts index 4084d270..81d4198f 100644 --- a/packages/rstack/src/setup/install.ts +++ b/packages/rstack/src/setup/install.ts @@ -1,13 +1,5 @@ import { spawnSync } from 'node:child_process'; -import { - chmodSync, - existsSync, - mkdirSync, - readFileSync, - readdirSync, - statSync, - writeFileSync, -} from 'node:fs'; +import { chmodSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'; import path from 'node:path'; import { createHookFiles, hookNames } from './hooks.ts'; @@ -195,10 +187,6 @@ const claimOwner = ( return owner === project ? undefined : ownerConflict(owner); } - if (readdirSync(directory).some((entry) => entry !== '.gitignore')) { - return directoryConflict(gitRoot, directory); - } - try { // Exclusive creation makes concurrent prepare scripts agree on one owner. writeFileSync(ownerPath, `${project}\n`, { flag: 'wx' });