fix: session-start hook fails silently when dl.google.com is blocked
The Claude Code web egress proxy does not include dl.google.com in its allowlist, causing the session-start hook to abort entirely (due to set -euo pipefail) when Android SDK downloads fail. This cascading failure also prevented local.properties creation and ANDROID_HOME export. Additionally, JAVA_TOOL_OPTIONS contains nonProxyHosts entries for *.google.com and *.googleapis.com, which causes the JVM to bypass the proxy for Google Maven, resulting in connection failures. Changes: - Remove set -euo pipefail; use per-section error handling instead - Fix JAVA_TOOL_OPTIONS: strip *.google.com from nonProxyHosts - Fix no_proxy: remove *.google.com and *.googleapis.com entries - Move local.properties and env exports before SDK download section - Make SDK downloads non-fatal with clear warning messages - Install standalone ktlint as fallback for spotlessApply - Create spotless-apply wrapper script for proxy-blocked environments - Update Stop hook to fall back to spotless-apply when Gradle fails https://claude.ai/code/session_01HeWiRdKDTnMGfEBUegk3d1
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "./gradlew spotlessApply",
|
||||
"command": "./gradlew spotlessApply 2>/dev/null || spotless-apply",
|
||||
"timeout": 120
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user