diff --git a/src/torch-config.mjs b/src/torch-config.mjs index 2e40b76..e5c04b2 100644 --- a/src/torch-config.mjs +++ b/src/torch-config.mjs @@ -71,21 +71,8 @@ export function getTorchConfigPath() { const localPath = path.resolve(process.cwd(), DEFAULT_CONFIG_PATH); const parentPath = path.resolve(process.cwd(), '..', DEFAULT_CONFIG_PATH); const cwdBaseName = path.basename(process.cwd()); - const parentPkgPath = path.resolve(process.cwd(), '..', 'package.json'); - let parentLooksLikeHostRepo = false; - - try { - if (fs.existsSync(parentPkgPath)) { - const parentPkgRaw = fs.readFileSync(parentPkgPath, 'utf8'); - const parentPkg = JSON.parse(parentPkgRaw); - parentLooksLikeHostRepo = parentPkg && typeof parentPkg.name === 'string' && parentPkg.name !== 'torch-lock'; - } - } catch { - parentLooksLikeHostRepo = false; - } - // Host-repo mode: when running from "/torch", prefer parent config. - if (cwdBaseName === 'torch' && parentLooksLikeHostRepo && fs.existsSync(parentPath)) { + if (cwdBaseName === 'torch' && fs.existsSync(parentPath)) { return parentPath; }