Skip to content

Commit 8a62b53

Browse files
rajsinghtechclaude
andcommitted
Fix table formatting for device tags in list-devices.sh
Convert tags array to comma-separated string before TSV conversion to prevent 'array is not valid in a csv row' jq error when displaying device list in table format. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent dc41b08 commit 8a62b53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tailscale/scripts/list-devices.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ fi
3838
if [ "$FORMAT" == "json" ]; then
3939
echo "$RESPONSE_BODY" | jq .
4040
elif [ "$FORMAT" == "table" ]; then
41-
echo "$RESPONSE_BODY" | jq -r '.devices[] | [.name, .addresses[0], .os, .tags // [], (.online // false)] | @tsv' | column -t -s $'\t' -N "NAME,IP,OS,TAGS,ONLINE"
41+
echo "$RESPONSE_BODY" | jq -r '.devices[] | [.name, .addresses[0], .os, (.tags // [] | join(",")), (.online // false)] | @tsv' | column -t -s $'\t' -N "NAME,IP,OS,TAGS,ONLINE"
4242
fi

0 commit comments

Comments
 (0)