fix: add 'hooks' to CODEX_SYSTEM_RESOURCE_ENTRIES (#7120)
This commit is contained in:
@@ -217,4 +217,16 @@ describe('syncSystemCodexResourcesIntoManagedHome', () => {
|
||||
expect(lstatSync(runtimeProfilePath).isSymbolicLink()).toBe(false)
|
||||
expect(readFileSync(runtimeProfilePath, 'utf-8')).toBe('second\n')
|
||||
})
|
||||
|
||||
it('mirrors hooks directory into the managed runtime home (regression test for 127 exit)', () => {
|
||||
const systemHooksPath = join(getSystemCodexHomePath(), 'hooks')
|
||||
const runtimeHooksPath = join(getRuntimeCodexHomePath(), 'hooks')
|
||||
mkdirSync(systemHooksPath, { recursive: true })
|
||||
writeFileSync(join(systemHooksPath, 'observe-tool-use.sh'), '#!/bin/bash\necho ok\n')
|
||||
|
||||
syncSystemCodexResourcesIntoManagedHome()
|
||||
|
||||
expect(lstatSync(runtimeHooksPath).isSymbolicLink()).toBe(true)
|
||||
expectSymbolicLinkTargetIfLinked(runtimeHooksPath, systemHooksPath)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -16,6 +16,7 @@ import { dirname, join } from 'node:path'
|
||||
|
||||
const CODEX_SYSTEM_RESOURCE_ENTRIES = [
|
||||
'skills',
|
||||
'hooks',
|
||||
'plugins',
|
||||
'plugin-state',
|
||||
'profile-v2',
|
||||
|
||||
Reference in New Issue
Block a user