@@ -7,6 +7,7 @@ import (
10+ "github.com/charmbracelet/crush/internal/shell"
10 "github.com/tidwall/gjson"
11 "github.com/tidwall/gjson"
@@ -51,6 +52,7 @@ func BuildPayload(eventName, sessionID, cwd, toolName, toolInputJSON string) []b
51// It includes all current process env vars plus hook-specific ones.
52// It includes all current process env vars plus hook-specific ones.
52func BuildEnv(eventName, toolName, sessionID, cwd, projectDir, toolInputJSON string) []string {
53func BuildEnv(eventName, toolName, sessionID, cwd, projectDir, toolInputJSON string) []string {
53 env := os.Environ()
54 env := os.Environ()
55+ env = append(env, shell.CrushEnvMarkers()...)
54 env = append(env,
56 env = append(env,
55 fmt.Sprintf("CRUSH_EVENT=%s", eventName),
57 fmt.Sprintf("CRUSH_EVENT=%s", eventName),
56 fmt.Sprintf("CRUSH_TOOL_NAME=%s", toolName),
58 fmt.Sprintf("CRUSH_TOOL_NAME=%s", toolName),