Skip to content

fix(cli): print null when get attr misses - #2522

Open
MaxWang007 wants to merge 1 commit into
vercel-labs:mainfrom
MaxWang007:cursor/fix-get-attr-missing-9133
Open

MaxWang007 wants to merge 1 commit into
vercel-labs:mainfrom
MaxWang007:cursor/fix-get-attr-missing-9133

Conversation

@MaxWang007

Copy link
Copy Markdown

get attr printed ✓ Done when the attribute wasn't there, the same line click and fill print on success. The daemon returns value: null in that case, and the plain-text formatter only handled strings, so it fell through to the generic success line.

It now prints null for a missing attribute. An empty attribute still prints a blank line, and --json is unchanged ("value": null vs "value": ""). The MCP text output prints null too instead of the raw JSON. I added a short note to the get attr docs and skill reference.

Fixes #1938

Testing:

  • cargo fmt --all -- --check
  • cargo clippy --locked -- -D warnings
  • cargo test --locked, including new unit tests for missing vs empty in plain text, JSON, and MCP output

A missing attribute came back as JSON null. Plain text only printed
string values, so the formatter fell through to the generic success
line and a read looked like click or fill.

Print null when the attribute is absent. An empty value stays a blank
line, and --json still reports null or an empty string.
@vercel

vercel Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@MaxWang007 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get attr on a missing attribute prints the generic success line instead of saying it is absent

1 participant