Prevent managed agent hooks from hanging (#6148)

This commit is contained in:
Brennan Benson
2026-06-23 17:22:10 -07:00
committed by GitHub
parent 5d8617bc71
commit e03a1cf769
14 changed files with 519 additions and 22 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import { join } from 'path'
import type { SFTPWrapper } from 'ssh2'
import type { AgentHookInstallState, AgentHookInstallStatus } from '../../shared/agent-hook-types'
import {
buildManagedCommandHook,
createManagedCommandMatcher,
buildWindowsAgentHookPostCommand,
getSharedManagedScriptPath,
@@ -212,7 +213,7 @@ function buildInstalledConfig(
const cleaned = removeManagedCommands(current, isManagedCommand)
const definition: HookDefinition = {
...event.definition,
hooks: [{ type: 'command', command }]
hooks: [buildManagedCommandHook(command)]
}
nextHooks[event.eventName] = [...cleaned, definition]
}