mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-26 10:01:28 +08:00
- Global --dry-run flag and ECC_DRY_RUN=1 env var - Enriched preview: shows target file path, tool name, and command - --dry-run stripped from argv so command routing works correctly - Handles non-JSON and empty stdin gracefully (session/stop hooks) - 10 tests covering isDryRun(), hook gating, enriched output, CLI routing
This commit is contained in:
@@ -50,6 +50,10 @@ function parseProfiles(rawProfiles, fallback = ['standard', 'strict']) {
|
||||
return parsed.length > 0 ? parsed : [...fallback];
|
||||
}
|
||||
|
||||
function isDryRun() {
|
||||
return process.env.ECC_DRY_RUN === '1';
|
||||
}
|
||||
|
||||
function isHookEnabled(hookId, options = {}) {
|
||||
const id = normalizeId(hookId);
|
||||
if (!id) return true;
|
||||
@@ -71,4 +75,5 @@ module.exports = {
|
||||
getDisabledHookIds,
|
||||
parseProfiles,
|
||||
isHookEnabled,
|
||||
isDryRun,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user