resolve
_resolve
Working directory resolution helpers for git hooks.
resolve_working_dir(params, context, *, param_key='working_dir')
Resolve the working directory from params and context.
Handles the case where worktree_path in context is a dict
(as stored by WorktreeAddHook via inject_result).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
dict[str, object]
|
Hook keyword parameters. |
required |
context
|
dict[str, object]
|
Session context dictionary. |
required |
param_key
|
str
|
Parameter key to check first (default |
'working_dir'
|
Returns:
| Type | Description |
|---|---|
Path
|
Resolved working directory as a Path. |