mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-15 14:33:33 +08:00
fix: preserve commit-quality blocking in bash dispatcher
This commit is contained in:
@@ -380,7 +380,11 @@ function evaluate(rawInput) {
|
||||
}
|
||||
|
||||
function run(rawInput) {
|
||||
return evaluate(rawInput).output;
|
||||
const result = evaluate(rawInput);
|
||||
return {
|
||||
stdout: result.output,
|
||||
exitCode: result.exitCode,
|
||||
};
|
||||
}
|
||||
|
||||
// ── stdin entry point ────────────────────────────────────────────
|
||||
|
||||
@@ -74,7 +74,7 @@ function runTests() {
|
||||
|
||||
if (test('post dispatcher writes both bash audit and cost logs in one pass', () => {
|
||||
const homeDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ecc-bash-dispatcher-'));
|
||||
const payload = { tool_input: { command: 'npm publish --token abc123' } };
|
||||
const payload = { tool_input: { command: 'npm publish --token fixture-token' } };
|
||||
|
||||
try {
|
||||
const result = runScript(postDispatcher, payload, {
|
||||
@@ -89,8 +89,8 @@ function runTests() {
|
||||
|
||||
assert.ok(auditLog.includes('--token=<REDACTED>'));
|
||||
assert.ok(costLog.includes('tool=Bash command=npm publish --token=<REDACTED>'));
|
||||
assert.ok(!auditLog.includes('abc123'));
|
||||
assert.ok(!costLog.includes('abc123'));
|
||||
assert.ok(!auditLog.includes('fixture-token'));
|
||||
assert.ok(!costLog.includes('fixture-token'));
|
||||
} finally {
|
||||
fs.rmSync(homeDir, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user