mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-21 00:58:07 +02:00
fix(hooks): keep silent hook paths silent (#2987)
* fix(hooks): keep silent hook paths silent * fix(hooks): harden stream failure handling * fix(hooks): settle interrupted input streams * test(hooks): name stream input limits * test(hooks): isolate PostToolUse dispatcher fixtures
This commit is contained in:
@@ -126,6 +126,16 @@ function resolveEccRoot(options = {}) {
|
||||
return claudeDir;
|
||||
}
|
||||
|
||||
function normalizePluginRootForPlatform(rootDir, platform = process.platform) {
|
||||
if (platform !== 'win32' || typeof rootDir !== 'string') return rootDir;
|
||||
|
||||
const match = rootDir.match(/^\/([a-zA-Z])(?:\/(.*))?$/);
|
||||
if (!match) return rootDir;
|
||||
|
||||
const [, driveLetter, rest = ''] = match;
|
||||
return `${driveLetter.toUpperCase()}:/${rest}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compact inline locator for embedding in hooks.json and command .md code blocks.
|
||||
*
|
||||
@@ -151,5 +161,6 @@ const INLINE_RESOLVE = `(function(){var p=require('path'),f=require('fs'),o=requ
|
||||
|
||||
module.exports = {
|
||||
resolveEccRoot,
|
||||
normalizePluginRootForPlatform,
|
||||
INLINE_RESOLVE,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user