Fix functional issues found during comprehensive testing

- Fix sf-retrieve: Replace xargs with Bash parameter expansion for whitespace
  trimming to avoid 'unterminated quote' errors when processing comma-separated
  metadata types containing quotes or special characters

- Fix sf-apex-run: Replace invalid JavaScript-style ternary operator with proper
  Bash conditional logic for code truncation display

All bash scripts now work correctly with real parameter combinations against
live Salesforce orgs. Testing performed against PWC-TEAM-DEV org confirmed
all functionality works as documented in README.md
This commit is contained in:
reynold
2025-08-28 21:19:48 +08:00
parent ca98742891
commit 65ad76c34c
2 changed files with 11 additions and 3 deletions

View File

@@ -181,7 +181,11 @@ if [[ -n "$APEX_FILE" ]]; then
echo " Lines: $(wc -l < "$APEX_FILE")"
fi
elif [[ -n "$APEX_CODE" ]]; then
echo " Code: ${APEX_CODE:0:50}${#APEX_CODE > 50 ? '...' : ''}"
if [[ ${#APEX_CODE} -gt 50 ]]; then
echo " Code: ${APEX_CODE:0:50}..."
else
echo " Code: $APEX_CODE"
fi
fi
echo