( hookEvent: 'Setup' | 'SessionStart' | 'CwdChanged' | 'FileChanged', hookIndex: number, )
| 41 | } |
| 42 | |
| 43 | export async function getHookEnvFilePath( |
| 44 | hookEvent: 'Setup' | 'SessionStart' | 'CwdChanged' | 'FileChanged', |
| 45 | hookIndex: number, |
| 46 | ): Promise<string | null> { |
| 47 | const prefix = hookEvent.toLowerCase() |
| 48 | const sessionEnvDir = await getSessionEnvDirPath() |
| 49 | if (!sessionEnvDir) return null |
| 50 | return join(sessionEnvDir, `${prefix}-hook-${hookIndex}.sh`) |
| 51 | } |
| 52 | |
| 53 | export async function clearCwdEnvFiles(): Promise<void> { |
| 54 | try { |
no test coverage detected