Fix second Argument-list-too-long spot in cmd_import
The command_id extraction passed the full command-submission response (which echoes back the whole files array) as a python argv arg - same ARG_MAX issue as the api_post fix, one step later. Now piped via stdin. The actual command submission already worked with the first fix; this only affected reading back the response. Claude-Session: https://claude.ai/code/session_01HZQK6jHmdTpFjFZM8FUnqA
This commit is contained in:
@@ -301,7 +301,7 @@ print(json.dumps({'name': 'ManualImport', 'files': files, 'importMode': 'auto'})
|
||||
local response
|
||||
response=$(api_post "command" "$payload")
|
||||
local command_id
|
||||
command_id=$(python3 -c "import json,sys; print(json.loads(sys.argv[1])['id'])" "$response")
|
||||
command_id=$(echo "$response" | python3 -c "import json,sys; print(json.load(sys.stdin)['id'])")
|
||||
|
||||
# Poll for completion
|
||||
for _ in $(seq 1 30); do
|
||||
|
||||
Reference in New Issue
Block a user