Skip to content

Commit 616bb70

Browse files
committed
fix if then else
1 parent 84e8e1a commit 616bb70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/warp/scripts/on-permission-request.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ TOOL_INPUT=$(echo "$INPUT" | jq -c '.tool_input // {}' 2>/dev/null)
1515
[ -z "$TOOL_INPUT" ] && TOOL_INPUT='{}'
1616

1717
# Build a human-readable summary
18-
TOOL_PREVIEW=$(echo "$INPUT" | jq -r '.tool_input | if .command then .command elif .file_path then .file_path else (tostring | .[0:80]) end // ""' 2>/dev/null)
18+
TOOL_PREVIEW=$(echo "$INPUT" | jq -r '(.tool_input | if .command then .command elif .file_path then .file_path else (tostring | .[0:80]) end) // ""' 2>/dev/null)
1919
SUMMARY="Wants to run $TOOL_NAME"
2020
if [ -n "$TOOL_PREVIEW" ]; then
2121
if [ ${#TOOL_PREVIEW} -gt 120 ]; then

0 commit comments

Comments
 (0)